Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when clearing axes created with twinx #4160

Closed
astrofrog opened this issue Feb 25, 2015 · 2 comments
Closed

Bug when clearing axes created with twinx #4160

astrofrog opened this issue Feb 25, 2015 · 2 comments

Comments

@astrofrog
Copy link
Contributor

Buggy case

The following example produces an empty figure:

import matplotlib.pyplot as plt

fig = plt.figure()
ax1 = fig.add_subplot(1,1,1)
ax2 = ax1.twinx()
ax2.cla()
ax1.plot([1,2,3])
fig.savefig('test.png')

test

Control case

If I remove twinx it works:

import matplotlib.pyplot as plt

fig = plt.figure()
ax1 = fig.add_subplot(1,1,1)
ax2 = ax1.twinx()
ax1.plot([1,2,3])
fig.savefig('test.png')

test

Versions

$ python --version
Python 3.4.2 :: Continuum Analytics, Inc.
$ python -c 'import matplotlib; print(matplotlib.__version__)'
1.4.2
@tacaswell
Copy link
Member

Duplicate of #3633 which should have been fixed by #3634 which should have been released with 1.4.3. If this still exists in 1.4.3 please ping to have reopened.

@astrofrog
Copy link
Contributor Author

@tacaswell - ah yes, it is indeed fixed now - sorry for the noise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants