MCPcopy Create free account
hub / github.com/grantjenks/python-sortedcontainers / test_plot

Function test_plot

tests/benchmark_plot.py:44–60  ·  view source on GitHub ↗
(test)

Source from the content-addressed store, hash-verified

42 return kinds
43
44def test_plot(test):
45 ax = plt.gca()
46 ax.grid(linestyle='dashed', linewidth=0.5)
47 cmap = matplotlib.cm.get_cmap('Set1')
48 colors = list(cmap.colors)
49 colors[0], colors[1] = colors[1], colors[0]
50 del colors[5]
51 ax.set_prop_cycle('color', colors)
52 kinds = args.kind or list(data[test])
53 for order, kind in enumerate(kinds):
54 kind_plot(test, kind, len(kinds) - order)
55 plt.ylim(ymin=9e-7)
56 plt.loglog()
57 plt.title(args.name + ' Performance: ' + test)
58 plt.ylabel('Seconds')
59 plt.xlabel('List Size')
60 plt.legend(kinds, loc=2)
61
62def kind_plot(test, kind, zorder):
63 sizes = sorted(data[test][kind].keys())

Callers 1

benchmark_plot.pyFile · 0.85

Calls 1

kind_plotFunction · 0.85

Tested by

no test coverage detected