-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Display issues while using dash with scatter3d, scattergl, and heatmaps/contours #2624
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
Comments
Ideally, we would like a reproducible example in JS. If that's not possible for you, could at least share the "data"/"layout" attributes you use to make those graphs. Thank you. |
... and also could you provide the plotly.js version used in your dash app. You should be able to enter |
Thanks @etpinard |
Ok. Maybe switching to |
@chriddyp : Would that be possible? If yes, I can test it out and report back. Thanks. |
It does not, the plotly.js version is not configurable. I can upgrade plotly.js in a new release soon.
The easiest way to do this is probably to export the figure into plot.ly, I've made instructions on how to do that here: https://community.plot.ly/t/mega-sharing-graphs-with-chart-studio/8869 |
Maybe we should add dash-related instructions to https://github.com/plotly/plotly.js/blob/master/.github/ISSUE_TEMPLATE.md ? |
I have exported to the chart studio. |
@vivekvs1 thanks!
|
Thanks @etpinard . Sorry- I was away for the weekend. For (2), I pass a new 'z' 2d array when I change the data. It works perfectly fine when using Heatmaps. But when I replace the Heatmap with Contour, the irregular behavior appears. Also when I switch to a 3d plot (see gif for switch from 3d to 2d) and back to the 2d plot, it displays correctly again. The behaviour for (3) appears for Scattergl only. So the temporary workaround I made was to have all plots layers as Scattergl except for the (blue) selection point layer (made it as Scatter). This seems to solve the problem for now. I haven't tested with larger data sets. |
Could you please share that "new" 2d array with us. Thanks!
https://codepen.io/etpinard/pen/vjaGLW?editors=1111 changes all 'scatter' traces to 'scattergl' and seems to work fine in plotly.js 1.37.1 : |
(2) Sorry- I had to regenerate the data and that took a while. I have created a chart with the new z values. (3) For this, I realized that I was not clear in my description. My apologies. In your example, you are just making a selecting using the box tool (small blue dots). In mine, I am generating a new layer of blue dots from the selection made and displaying it (large blue dots). I had to do it this way since I have hidden nodes that I want to be as a part of my box selection. I have an invisible layer to represent the hidden nodes in the chart that I use on hover to identify the joints present. Since I cannot select the invisible layer, I get the coordinates of the box selection and use it to make a new layer of all the enclosed hidden joints. |
@vivekvs1 are you saying the view in https://plot.ly/~vivekvs1/47/#/ is wrong? Or that updating https://plot.ly/~vivekvs1/43/#/ to https://plot.ly/~vivekvs1/47/#/ doesn't give the correct result? |
Hi @etpinard, Updating (switching) from one figure to another when using the Contour (not heatmap - which displays fine) like shown in the gif, is incorrect. In the gif, when switching from Level 0 to 4.6 and back to Level 0, shows leftover traces from Level 4.6, instead of refreshing to show Level 0. Thanks |
Ok thanks @vivekvs1 This issue is getting a little out-of-focus, so I split it into: As for your point (3) in #2624 (comment), I'm afraid this issue might be duplicate of #2298 |
Thank you very much @etpinard ! |
No thank you @vivekvs1 for bringing up these issues. |
Hi,
I have encountered a few display bugs while using plotly graphs in the dash app that I though I should bring attention to:
When switching from scatter3d to Heatmap/Contour and back to scatter3d, a white band artifact shows on the scatter3d where the colorbar previously existed on the Heatmap/Contour.

Heatmap works as expected when switching to different data in the same plot (Level in this context). However, changing the Heatmap to a Contour plot displays incorrectly when switching the data (shows only a portion of the data).
I am not sure if the three issues are connected. I am using dash-core-components 0.22.1 .
Thanks,
Vivek
The text was updated successfully, but these errors were encountered: