Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b09ede commit 2c3c907Copy full SHA for 2c3c907
1 file changed
lib/matplotlib/pyplot.py
@@ -631,12 +631,13 @@ def twinx(ax=None):
631
the right, and the *ax2* instance is returned.
632
633
.. seealso::
634
- :file:`examples/pylab_examples/two_scales.py`
+ :file:`examples/api_examples/two_scales.py`
635
"""
636
if ax is None:
637
ax=gca()
638
+ ax1 = ax.twinx()
639
draw_if_interactive()
- return ax.twinx()
640
+ return ax1
641
642
643
def twiny(ax=None):
@@ -647,8 +648,9 @@ def twiny(ax=None):
647
648
649
650
651
+ ax1 = ax.twiny()
652
- return ax.twiny()
653
654
655
656
0 commit comments