Skip to content

Commit 9762d72

Browse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR #22496: Fix units in quick start example
1 parent b900ee4 commit 9762d72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tutorials/introductory/usage.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -465,16 +465,16 @@ def my_plotter(ax, data1, data2, param_dict):
465465
# :doc:`/gallery/subplots_axes_and_figures/secondary_axis` for further
466466
# examples.
467467

468-
fig, (ax1, ax3) = plt.subplots(1, 2, figsize=(8, 2.7), layout='constrained')
468+
fig, (ax1, ax3) = plt.subplots(1, 2, figsize=(7, 2.7), layout='constrained')
469469
l1, = ax1.plot(t, s)
470470
ax2 = ax1.twinx()
471471
l2, = ax2.plot(t, range(len(t)), 'C1')
472472
ax2.legend([l1, l2], ['Sine (left)', 'Straight (right)'])
473473

474474
ax3.plot(t, s)
475-
ax3.set_xlabel('Angle [°]')
475+
ax3.set_xlabel('Angle [rad]')
476476
ax4 = ax3.secondary_xaxis('top', functions=(np.rad2deg, np.deg2rad))
477-
ax4.set_xlabel('Angle [rad]')
477+
ax4.set_xlabel('Angle [°]')
478478

479479
##############################################################################
480480
# Color mapped data

0 commit comments

Comments
 (0)