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

1.2.0 regression: custom scale not working #1844

Closed
torfbolt opened this issue Mar 22, 2013 · 6 comments
Closed

1.2.0 regression: custom scale not working #1844

torfbolt opened this issue Mar 22, 2013 · 6 comments
Milestone

Comments

@torfbolt
Copy link
Contributor

Custom scales are not respected by matplotlib 1.2.0, as can be seen comparing the two gallery examples
http://matplotlib.org/1.1.1/examples/api/custom_scale_example.html
and
http://matplotlib.org/examples/api/custom_scale_example.html

A quick print of matplotlib.scale.get_scale_names() shows that it is in the list. However, it does not seem to be applied when calling gca().set_yscale('mercator'). Calling gca().set_yscale('log') works however.

@torfbolt
Copy link
Contributor Author

Ok, it seems I found the problem:
The actual transformation function in the example is called transform(self, a), but with matplotlib 1.2 it has to be transform_non_affine(self, a).
Maybe someone can fix this in the example.

@pelson
Copy link
Member

pelson commented Mar 22, 2013

Thanks @torfbolt .

We should try to fix this before we tag v1.2.1.

@torfbolt - are you interested in submitting a PR?

@torfbolt
Copy link
Contributor Author

Sorry, don't have a branch of matplotlib at the moment, I just fixed it in my private class. Btw, are there plans to include further scales into matplotlib? I could supply an implementation of the sigmoid scale:
http://en.wikipedia.org/wiki/Sigmoid_function

Are there also test cases for the examples?

@pelson
Copy link
Member

pelson commented Mar 22, 2013

Are there also test cases for the examples?

Sadly not. Its something I'd like to see, but there are some hurdles we would have to overcome first. Under https://github.com/matplotlib/matplotlib/wiki/MEP12 we are also planning to tidy up most of the examples, but that really is a massive job (note to self: might be a good task for a sprint at SciPy'2013...)

@dmcdougall
Copy link
Member

...don't have a branch of matplotlib at the moment, I just fixed it in my private class...

If you do a diff -u old_class.py new_class.py and paste the output here, we'll be able to see what you changed to fix it. Also, I think Github has an inline web editor that turns your edits into a pull request.

torfbolt added a commit to torfbolt/matplotlib that referenced this issue Mar 23, 2013
pelson pushed a commit that referenced this issue Mar 25, 2013
@mdboom
Copy link
Member

mdboom commented Mar 25, 2013

Closing, since #1851 is closed.

@mdboom mdboom closed this as completed Mar 25, 2013
HubertHolin pushed a commit to HubertHolin/matplotlib that referenced this issue Apr 7, 2013
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

4 participants