MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / init_axis

Function init_axis

deps/memkind/src/test/draw_plots.py:65–86  ·  view source on GitHub ↗
(fig, suptitle, subplot_projection, x_label, x_ticks, x_values, y_label, y_ticks, y_values, z_label)

Source from the content-addressed store, hash-verified

63
64# initialize axis with labels, ticks and values
65def init_axis(fig, suptitle, subplot_projection, x_label, x_ticks, x_values, y_label, y_ticks, y_values, z_label):
66 assert fig is not None
67 fig.clf()
68 fig.suptitle(suptitle)
69 if subplot_projection:
70 ax = fig.add_subplot(111, projection=subplot_projection)
71 else:
72 ax = fig.add_subplot(111)
73 assert ax is not None
74 if x_label:
75 ax.set_xlabel(x_label)
76 if x_ticks is not None and x_values is not None:
77 ax.set_xticks(x_ticks)
78 ax.set_xticklabels(x_values)
79 if y_label:
80 ax.set_ylabel(y_label)
81 if y_ticks is not None and y_values is not None:
82 ax.set_yticks(y_ticks)
83 ax.set_yticklabels(y_values)
84 if z_label:
85 ax.set_zlabel(z_label)
86 return ax
87
88def draw_bar(ax, show_first_operation, x, y, time, init_time, draw_color):
89 assert ax is not None

Callers 1

draw_plots.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected