//引入必要的库 import matplotlib.pyplot as plt import numpy as np //绘制一个简单的散点图 # 创建数据 sizes = np.random.randint(1, 10, 5) labels = ['A', 'B', 'C', 'D', 'E'] # 绘制图表 plt.pie(sizes, labels=labels, autopct='%1.1f%%') plt.title('多维图表示例-饼图') plt.show()
//引入必要的库 import matplotlib.pyplot as plt import numpy as np //绘制一个简单的散点图 # 创建数据 sizes = np.random.randint(1, 10, 5) labels = ['A', 'B', 'C', 'D', 'E'] # 绘制图表 plt.pie(sizes, labels=labels, autopct='%1.1f%%') plt.title('多维图表示例-饼图') plt.show()