Skip to content

Commit c948e90

Browse files
authored
Merge pull request #25518 from ksunden/bar_demo_units
DOC: Fix the bars having numeric value of cm but labeled as inches
2 parents 2f7f62e + 88ed2c8 commit c948e90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

galleries/examples/units/bar_unit_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
tea_std = [2*cm, 1*cm, 1*cm, 4*cm, 2*cm]
2323

2424
fig, ax = plt.subplots()
25+
ax.yaxis.set_units(inch)
2526

2627
ind = np.arange(N) # the x locations for the groups
2728
width = 0.35 # the width of the bars
@@ -36,7 +37,6 @@
3637
ax.set_xticks(ind + width / 2, labels=['G1', 'G2', 'G3', 'G4', 'G5'])
3738

3839
ax.legend()
39-
ax.yaxis.set_units(inch)
4040
ax.autoscale_view()
4141

4242
plt.show()

0 commit comments

Comments
 (0)