阅读背景:

针对多维数组绘制一维数组?

来源:互联网 

Consider The following code:

考虑以下代码:

   import matplotlib.pyplot as plt
   x = [[512],[256],[1024],[2048],[4096],[8192],[32768],
       [65536],[131072]]
   y =[[900,1800],[ 600, 900, 1800, 2700,3600],
      [1800],[900,1800,3600,6000,7200,10800,12000,14400,28800],
      [900, 1800, 3600, 5400, 6000, 7200, 36000],
      [600, 900, 1200, 1800, 2700, 3600, 5400, 6000, 7200, 9600, 18000, 36000],
      [1800, 2700, 3600, 4800, 5400, 6000, 7200, 10800, 18000],
      [1800, 2700, 3600, 5400, 7200, 10800, 21600],[900, 1800, 3600, 7200]]

   fig = plt.figure()

   graph = fig.add_subplot(111)
   for i in range(len(x)):
     plt.plot(x[i], y[i], color='blue', lw=1, marker='s')
   plt.title('userid_22')
   plt.xlabel('Processors')
   plt.ylabel('Est_runtime')

   plt.savefig('processor-esttimeanalysis4.png')
   plt.show()
   imp



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: