Skip to content

Contour plot interpolation method always treats data as linear #5899

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

Closed
andrew-matteson opened this issue Aug 20, 2021 · 0 comments · Fixed by #5985
Closed

Contour plot interpolation method always treats data as linear #5899

andrew-matteson opened this issue Aug 20, 2021 · 0 comments · Fixed by #5985
Labels
bug something broken
Milestone

Comments

@andrew-matteson
Copy link
Contributor

The implementation of the Catmull-Rom interpolation treats the data as linear. This results in very poor contours for plots with log-scale axes.

The linked example is a 5x5 contour generated in two different ways, with data that has x and y log-spaced. Code pen example: https://codepen.io/andrew-matteson/pen/oNWKJJZ

In the first plot, the x and y data is transformed to a linear scale by taking the log base 10. Ticks are managed with tick val / tick text. The contour data looks as expected.

In the second plot, the x and y data are taken directly, and the x and y axes are of type: 'log'. This produces nice axes, but very poor contours.

Screen shots:

Screen Shot 2021-08-20 at 11 03 45 AM
Screen Shot 2021-08-20 at 11 03 36 AM

In the absence of axis dependent interpolation, a workaround to get the nice "log style" axes with the nice contours would be appreciated.

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

Successfully merging a pull request may close this issue.

2 participants