Fix invalid transformation in InvertedSymmetricalLogTransform. #1146

Merged
merged 1 commit into from Sep 2, 2012

Projects

None yet

2 participants

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 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