Skip to content
Snippets Groups Projects
Commit e729170b authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 127002f4
No related branches found
No related tags found
No related merge requests found
...@@ -5,17 +5,25 @@ import matplotlib.pyplot as plt ...@@ -5,17 +5,25 @@ import matplotlib.pyplot as plt
barWidth = 0.10 barWidth = 0.10
def do_plot(x_values, y_values, y_labels, colors, x_label, invert=False): def do_plot(x_values, y_values, line_labels, colors, x_axis_label=None, y_axis_label=None, invert=False, flip=False):
num_lines = len(y_values) num_lines = len(y_values)
npts = len(x_values) npts = len(x_values)
for k in range(num_lines): for k in range(num_lines):
# plt.plot(y_values[k], x_values, color=colors[k], label=y_labels[k]) if flip:
plt.plot(x_values, y_values[k], color=colors[k], label=y_labels[k]) plt.plot(y_values[k], x_values, color=colors[k], label=line_labels[k])
plt.xlabel(x_label, fontweight='bold') else:
plt.plot(x_values, y_values[k], color=colors[k], label=line_labels[k])
if x_axis_label is not None:
plt.xlabel(x_axis_label, fontweight='bold')
if y_axis_label is not None:
plt.ylabel(y_axis_label, fontweight='bold')
if invert: if invert:
plt.gca().invert_yaxis() plt.gca().invert_yaxis()
# create and show graphic # create and show graphic
plt.legend() plt.legend()
plt.show() plt.show()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment