Commits

Takafumi Arakaki  committed 45eb4f9

plot normalized time instead of real time so that I can use semilogx, not loglog

  • Participants
  • Parent commits 9bd68c9

Comments (0)

Files changed (1)

File run/plotbm_constinloop.py

     repeat1 = repeat[1]
     assert_equal(repeat0, repeat1)
     time_mean = [t.mean(axis=1) for t in time]
+    time_min = [t.min(axis=1) for t in time]
+    time_all_mean = numpy.concatenate(time, axis=1).mean(axis=1)
 
     pylab.subplot(211)
     for (i, method) in enumerate(method_list):
         for j in range(time[i].shape[1]):
-            pylab.loglog(repeat0, time[i][:,j], ',', color=color_list[i])
-        pylab.loglog(repeat0, time_mean[i], '-',
-                     label=method, color=color_list[i])
+            pylab.semilogx(repeat0, time[i][:,j] / time_all_mean, ',',
+                           color=color_list[i])
+        pylab.semilogx(repeat0, time_mean[i] / time_all_mean, '-',
+                       label=method, color=color_list[i])
+    (xmin, xmax) = pylab.xlim()
+    pylab.hlines(1, xmin, xmax, label="_nolegend_")
+    pylab.xlim(xmin, xmax)
     pylab.legend(loc='best')
-    pylab.ylabel('time')
+    pylab.ylabel('normalized time')
 
     pylab.subplot(212)
-    pylab.semilogx(repeat0, time_mean[0] / time_mean[1])
+    pylab.semilogx(repeat0, time_mean[0] / time_mean[1], label='mean')
+    pylab.semilogx(repeat0, time_min[0] / time_min[1], label='min')
+    pylab.legend(loc='best')
     pylab.ylabel('%s / %s' % tuple(method_list))
     pylab.xlabel('repeat')