Skip to content

Contour plot interpolation method always treats data as linear #5899

Closed
@andrew-matteson

Description

@andrew-matteson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions