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

Counterintuitive behavior using get/set _yticklabels (or _xticklabels) #2246

Closed
adrn opened this issue Jul 23, 2013 · 1 comment
Closed

Counterintuitive behavior using get/set _yticklabels (or _xticklabels) #2246

adrn opened this issue Jul 23, 2013 · 1 comment

Comments

@adrn
Copy link
Contributor

adrn commented Jul 23, 2013

One would expect this to work:

fig,ax = subplots(1,1)
ax.set_yticklabels(ax.get_yticklabels())

But it instead replaces the labels with the str representation of the Text object, something like Text(0, 0, '1.0') and etc.

@mdboom
Copy link
Member

mdboom commented Jul 23, 2013

Yeah, I'd say that's a bug. I guess set_yticklabels needs to do something like:

if isinstance(s, Text):
    # ... extract the string from the text object and use that

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

No branches or pull requests

3 participants