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

minor

parent 16b17542
No related branches found
No related tags found
No related merge requests found
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
# set width of bar
barWidth = 0.10
def do_plot(group_names, group_values, value_labels, bar_colors, xlabel): def do_plot(group_names, group_values, value_labels, bar_colors, xlabel, ylabel, barWidth=0.1):
num_groups = len(group_names) num_groups = len(group_names)
num_bars = len(group_values) num_bars = len(group_values)
...@@ -21,7 +18,8 @@ def do_plot(group_names, group_values, value_labels, bar_colors, xlabel): ...@@ -21,7 +18,8 @@ def do_plot(group_names, group_values, value_labels, bar_colors, xlabel):
plt.xlabel(xlabel, fontweight='bold') plt.xlabel(xlabel, fontweight='bold')
plt.xticks([r + barWidth for r in range(num_groups)], group_names) plt.xticks([r + barWidth for r in range(num_groups)], group_names)
plt.ylabel('count', fontweight='bold') if ylabel is not None:
plt.ylabel('count', fontweight='bold')
# Create legend & Show graphic # Create legend & Show graphic
plt.legend() plt.legend()
......
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