Skip to content

Commit

Permalink
Merge 8ee6372 into 9790bc6
Browse files Browse the repository at this point in the history
  • Loading branch information
malzantot committed Dec 17, 2015
2 parents 9790bc6 + 8ee6372 commit 3d80911
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions examples/applications/plot_out_of_core_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,11 @@ def plot_accuracy(x, y, x_legend):

cls_runtime.append(total_vect_time)
cls_names.append('Vectorization')
bar_colors = rcParams['axes.color_cycle'][:len(cls_names)]
if 'axes.prop_cycle' in rcParams:
bar_colors_cycler = rcParams['axes.prop_cycle'][:len(cls_names)]
bar_colors = list(map(lambda x: x['color'], list(bar_colors_cycler)))
else:
bar_colors = rcParams['axes.color_cycle'][:len(cls_names)]

ax = plt.subplot(111)
rectangles = plt.bar(range(len(cls_names)), cls_runtime, width=0.5,
Expand Down Expand Up @@ -398,12 +402,15 @@ def autolabel(rectangles):
cls_names.append('Read/Parse\n+Feat.Extr.')
cls_runtime.append(vectorizing_time)
cls_names.append('Hashing\n+Vect.')
bar_colors = rcParams['axes.color_cycle'][:len(cls_names)]
if 'axes.prop_cycle' in rcParams:
bar_colors_cycler = rcParams['axes.prop_cycle'][:len(cls_names)]
bar_colors = list(map(lambda x: x['color'], list(bar_colors_cycler)))
else:
bar_colors = rcParams['axes.color_cycle'][:len(cls_names)]

ax = plt.subplot(111)
rectangles = plt.bar(range(len(cls_names)), cls_runtime, width=0.5,
color=bar_colors)

ax.set_xticks(np.linspace(0.25, len(cls_names) - 0.75, len(cls_names)))
ax.set_xticklabels(cls_names, fontsize=8)
plt.setp(plt.xticks()[1], rotation=30)
Expand Down

0 comments on commit 3d80911

Please sign in to comment.