@@ -43,26 +43,27 @@ def order_kinds(kinds):
43
43
44
44
def test_plot (test ):
45
45
ax = plt .gca ()
46
+ ax .grid (linestyle = 'dashed' , linewidth = 0.5 )
46
47
cmap = matplotlib .cm .get_cmap ('Set1' )
47
48
colors = list (cmap .colors )
48
49
colors [0 ], colors [1 ] = colors [1 ], colors [0 ]
49
50
del colors [5 ]
50
51
ax .set_prop_cycle ('color' , colors )
51
52
kinds = args .kind or list (data [test ])
52
- for kind in kinds :
53
- kind_plot (test , kind )
53
+ for order , kind in enumerate ( kinds ) :
54
+ kind_plot (test , kind , len ( kinds ) - order )
54
55
plt .ylim (ymin = 9e-7 )
55
56
plt .loglog ()
56
57
plt .title (args .name + ' Performance: ' + test )
57
58
plt .ylabel ('Seconds' )
58
59
plt .xlabel ('List Size' )
59
60
plt .legend (kinds , loc = 2 )
60
61
61
- def kind_plot (test , kind ):
62
+ def kind_plot (test , kind , zorder ):
62
63
sizes = sorted (data [test ][kind ].keys ())
63
64
# Timer isn't any better than micro-second resolution.
64
65
yvalues = [max (1e-6 , data [test ][kind ][size ][5 ]) for size in sizes ]
65
- plt .plot (sizes , yvalues , marker = 's' )
66
+ plt .plot (sizes , yvalues , marker = 's' , zorder = zorder )
66
67
67
68
if __name__ == '__main__' :
68
69
parser = argparse .ArgumentParser (description = 'Plotting' )
0 commit comments