import matplotlib.pyplot as plt import seaborn as sns # 导入seaborn库 import numpy as np # 导入numpy data = np.random.rand(12, 5) # 生成12行5列的随机数据 sns.violinplot(data=data) # 绘制小提琴图 plt.show() # 显示图形