Skip to content

Implement "connectgaps" for surface traces #2812

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
benauriemma opened this issue Jul 12, 2018 · 2 comments
Closed

Implement "connectgaps" for surface traces #2812

benauriemma opened this issue Jul 12, 2018 · 2 comments
Assignees
Labels
feature something new

Comments

@benauriemma
Copy link

I'm trying to create a surface plot, but it is not always the case that every point within the range I'm plotting over is defined. That is, my z matrix might resemble:

[
    [0, 1, 2, 3],
    [1, 2, 3, 4],
    [2, 3, undefined, 5],
    [3, 4, 5, 6]
]

If I try to create a surface plot using the above as the z matrix, the surface gets cut off and not all of the data is plotted. If I replace undefined with null or NaN, the same happens. If I replace undefined with empty, the code fails.

The only way I can get the rest of the data to plot is by replacing undefined with 0. However, this "pulls" the surrounding surface down to 0, which is misleading and especially problematic when all other data is much greater than 0.

I would be shocked if plotting an incomplete dataset is not a very common use case, and currently there's no good way to do it. I believe it would be usefull to provide a more intelligent handling for missing data. This could be leaving part of the surface out, or interpolating the missing value from surrounding values.

@benauriemma benauriemma changed the title Intelligent handling of missing data for surface plots Intelligent handling of missing data for surface plots type: feature request Jul 12, 2018
@benauriemma benauriemma changed the title Intelligent handling of missing data for surface plots type: feature request Intelligent handling of missing data for surface plots Jul 12, 2018
@etpinard
Copy link
Contributor

Adding a way to interpolate (assuming that's what you mean by "intelligent handling") for missing z values in surface would be great addition. In plotly.js lingo, we call this connectgaps: true as is already available for heatmap and contour traces.

@benauriemma ok if change the issue title accordingly?

@benauriemma
Copy link
Author

@etpinard , yes, I think that would be a great way of handling it intelligently. Github is not allowing me to change the title of the issue right now, but I will try again later.

"connectgaps for surface plots with missing data"

@etpinard etpinard changed the title Intelligent handling of missing data for surface plots Implement "connectgaps" for surface traces Jul 13, 2018
@etpinard etpinard added the feature something new label Jul 13, 2018
@archmoj archmoj self-assigned this Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

3 participants