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

snapshot...

parent 503e2726
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,29 @@ def do_plot(group_names, group_values, value_labels, bar_colors, title=None, xla ...@@ -38,6 +38,29 @@ def do_plot(group_names, group_values, value_labels, bar_colors, title=None, xla
plt.show() plt.show()
def do_plot_simple(x_values, y_values, color, title=None, xlabel=None, ylabel=None, ylim=None, barWidth=0.1):
fig, ax = plt.subplots()
if ylim is not None:
ax.set_ylim(ylim)
plt.bar(np.arange(len(x_values)), y_values, color=color, width=barWidth, edgecolor='black')
# Add xticks on the middle of the group bars
if xlabel is not None:
plt.xlabel(xlabel, fontweight='bold')
plt.xticks([r for r in range(len(x_values))], labels=[int(xlbl) for xlbl in x_values])
if ylabel is not None:
plt.ylabel(ylabel, fontweight='bold')
if title is not None:
plt.title(title, fontweight='bold')
# Create legend & Show graphic
plt.legend()
plt.show()
def run_plot_cld_layers(cld_layer_bot, cld_layer_top, hgt_ref, x_values, start, end): def run_plot_cld_layers(cld_layer_bot, cld_layer_top, hgt_ref, x_values, start, end):
plot_cld_layers(cld_layer_bot[start:end], cld_layer_top[start:end], hgt_ref[start:end], x_values[start:end]) plot_cld_layers(cld_layer_bot[start:end], cld_layer_top[start:end], hgt_ref[start:end], x_values[start:end])
......
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