-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
get_ticklabels returns '' in ipython/python interpreter #6638
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
Comments
Afaik the ticks will be popluated at draw time. |
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.plot([1,2,3])
plt.draw() works, but still won't work with 'MacOSX' backend, |
@story645 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ax.get_xticklabels & ax.get_yticklabels is returning a list of empty strings when I run the code via script/ipython interpreter, but works as expected (returns list of ticklabels) when called in ipython notebook. This makes me think it's a backend bug, but I'm mystified.
Env:
matplotlib version:
This will reproduce it: (I use agg here, but MacOSX is exhibiting the same behavior)
Both print statements yield
['', '', '', '', '']
when they should be[0, 1, 2]
&[1, 2, 3]
The text was updated successfully, but these errors were encountered: