From 8081fe69ff1d844a4e22ff38a1f91f6c7d8f66c3 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 18 Feb 2022 18:36:26 -0500 Subject: [PATCH] Fix units in quick start example cf. https://discourse.matplotlib.org/t/axis-labels-inverted-in-basic-usage-doc/22596 --- tutorials/introductory/quick_start.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/introductory/quick_start.py b/tutorials/introductory/quick_start.py index c21c85e92e67..34e3da9ab42a 100644 --- a/tutorials/introductory/quick_start.py +++ b/tutorials/introductory/quick_start.py @@ -468,16 +468,16 @@ def my_plotter(ax, data1, data2, param_dict): # :doc:`/gallery/subplots_axes_and_figures/secondary_axis` for further # examples. -fig, (ax1, ax3) = plt.subplots(1, 2, figsize=(8, 2.7), layout='constrained') +fig, (ax1, ax3) = plt.subplots(1, 2, figsize=(7, 2.7), layout='constrained') l1, = ax1.plot(t, s) ax2 = ax1.twinx() l2, = ax2.plot(t, range(len(t)), 'C1') ax2.legend([l1, l2], ['Sine (left)', 'Straight (right)']) ax3.plot(t, s) -ax3.set_xlabel('Angle [°]') +ax3.set_xlabel('Angle [rad]') ax4 = ax3.secondary_xaxis('top', functions=(np.rad2deg, np.deg2rad)) -ax4.set_xlabel('Angle [rad]') +ax4.set_xlabel('Angle [°]') ############################################################################## # Color mapped data