我有3组数据,其中X为X轴,Y1,Y2,Y3为Y轴。但是,数据大小太多,最多100000个数据点。我在下面的代码中绘制了散点图,但这太慢了。有什么办法可以加速它吗?
编码:utf-8
将matplotlib.pyplot导入为plt 将numpy导入为np 汇入 将熊猫作为PD导入
def plot_boxchart(x_axis,y1_axis,y2_axis,y3_axis):
#figure,ax = plt.subplots()
#xx_axis = np.concatenate((x_axis,x_axis,x_axis))
#y_axis = np.concatenate((y1_axis,y3_axis))
#color_set = ['red','blue','yellow']
plt.scatter(x_axis,marker = 'o',color='yellow',label='Input-State')
plt.scatter(x_axis,marker = '+',color='blue',label='Output-State')
plt.scatter(x_axis,y3_axis,marker = 'X',color='red',label='State-Change CElls')
plt.title("State Change on Cells Location",color='g')
plt.legend()
#plt.grid()
plt.xlabel("Cells Location")
plt.ylabel("State Voltage")
plt.show()