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

Fix invalid transformation in InvertedSymmetricalLogTransform. #1146

Merged
merged 1 commit into from Sep 2, 2012

Conversation

mcelrath
Copy link

The InvertedSymmetricalLogTransform was incorrect (used for "symlog" plots). There are two problems with the existing code: first, linthresh must be transformed to the target space. It is linear, but not equal to +/- linthresh in the original space. I introduced a new class member invlinthresh for the inverted linear threshold. Second, there is a parenthesis missing in the inverted formula.

This transform is likely unused by anyone, I needed it so I could add an image (imshow) to a symlog plot. Since imshow only works with linear axes, I added a second axes with twiny() but needed to be able to create a new image, appropriately scaled logarithmically. Thus, the correct inverse transform was needed so I could compute coordinates for the new linear axis.

I hope the problem and the fix are sufficiently obvious. If not I can provide a worksheet that demonstrates the problem.

efiring added a commit that referenced this pull request Sep 2, 2012
Fix invalid transformation in InvertedSymmetricalLogTransform.
@efiring efiring merged commit 92721ed into matplotlib:master Sep 2, 2012
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

Successfully merging this pull request may close these issues.

None yet

2 participants