| 63 | |
| 64 | # initialize axis with labels, ticks and values |
| 65 | def 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 | |
| 88 | def draw_bar(ax, show_first_operation, x, y, time, init_time, draw_color): |
| 89 | assert ax is not None |