Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d811561

Browse files
authored
Merge pull request #25535 from meeseeksmachine/auto-backport-of-pr-25518-on-v3.7.x
Backport PR #25518 on branch v3.7.x (DOC: Fix the bars having numeric value of cm but labeled as inches)
2 parents 6949898 + 6015dce commit d811561

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)