You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Surface graph has issue with small time ranges #3306
I've had an issue for quite a while and thought it would be good to raise here. It's an issue with graphs that are over a small amount of time. I've attempted to make a demonstration but the screenshot below will show my issue more clearly.
In A) you can see some random data over 50 minutes. In B) you can see random data over 50 seconds. A) works perfectly well, nice little graph. B) looks like an utter mess and is near impossible to use.
So that brings us to C), the screenshots (the first taken a few months ago, the second today) below that shows my real dataset. In a 2D heatmap it works fine but in a 3D surface graph it shows the data correctly but with the axis completely messed up. Sometimes it looks worse than others, but all the time there is a continuation of the date (y) axis. Sometimes it requires you to zoom out to see, but it is always there in the distance. This makes it unusable to me if I want to put it in front of users.
When I've looked online for help I found someone else having the exact same issue but they were using the python version of the library with a scatter3d.
This seems to be a bug opposed to an issue in my code. I have autorange set to false, the range of data is correct (["2018-09-06 20:48:32", "2018-09-06 20:55:57"] for second screenshot) and is using moment dates. I have double checked it on the latest version too and no change. Does anyone have any idea what is causing this issue?
Also another thing I've noticed, potentially related to this, is if there is no data on the graph but ranges are set on the axis then for the heatmap it shows correct ranges but the surface plot shows from 2000 to 2001.
My pleasure @ShaneHudson.
And thank you for using Plotly at first place!
Version 1.43.0 is setup and it would possibly be released tomorrow.
There are other bug fixes and improvements related to axis ticks & surface traces. In particular this PR should help improve the accuracy of data points on the surface. Although concerning small time-steps we are still working on the dataScale issue as well as local time offsets on 3D axes and webGL.
Therefore this issue is still open.
But until it fixed, one practical solution may be to use minutes instead of the whole date in the axis ticks and then add the date info into the axis label using a break line.
Now with this PR being merged, your graph could look like this demo.
I'm afraid not. I understand that the very small time scales are bound to throw it off, but the use-case is a raspberry pi that is uploading scans of radio frequency at regular intervals. The steps on the graph are caused by the scan being done in sweeps.
Another thing I noticed but probably related to this is that the 3D graph also struggles/fails when only one point in time is available. Is that expected behaviour?
A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.
What Sponsorship includes:
Completion of this feature to the Sponsor's satisfaction, in a manner coherent with the rest of the Plotly.js library and API
Tests for this feature
Long-term support (continued support of this feature in the latest version of Plotly.js)
Hi, I would like to know if you are able to and would be interested in trying to move forward the related pull request that I opened in the gl-axes3d repository that you depend on? My main motivation in the PR is improving plotly :) and I saw that plotly maintainers are also maintaining some of the gl-vis repositories. @archmoj maybe?
Hey, how are you doing? I found this issue, and there is something related to what I'm facing here.
You shared above a fiddle, and there is an axis label that is quite big, and this label enters the chart as you can see here:
I have some dates and would like to use them on my x labels, but it's not getting nice:
Hi @positron96 , I still like my changes in that PR. Currently the pipeline for my project that uses plotly patches the plotly bundle with those adjustments, which is not ideal 😄 but works. I can post the script later, in case nothing will happen.
Here's the patch as a bash script, to be called with the dist folder containing plotly as first argument:
set -x
PATH_WHERE_TO_REPLACE=$1;# replace `* model * vec4(something)` with `* (model * vec4(something))` for better numerical stability in 3D graphs
find $PATH_WHERE_TO_REPLACE -type f -name "*plotly*.js"| xargs sed -r -i -e 's/\* model \* vec4\(([^\)]*)\)/* (model * vec4(\1))/g'
Activity
ShaneHudson commentedon Dec 4, 2018
It looks like this may be related to #3155 but would appreciate any help on the matter.
archmoj commentedon Dec 4, 2018
@ShaneHudson Thank you very much for reporting this issue.
ShaneHudson commentedon Dec 5, 2018
Also another thing I've noticed, potentially related to this, is if there is no data on the graph but ranges are set on the axis then for the heatmap it shows correct ranges but the surface plot shows from 2000 to 2001.
archmoj commentedon Dec 5, 2018
@ShaneHudson Could you please create a demo related to the second issue?
ShaneHudson commentedon Dec 18, 2018
Thanks for doing that bug fix @archmoj. Do you have any idea when the next version will be published on npm please?
archmoj commentedon Dec 18, 2018
My pleasure @ShaneHudson.
And thank you for using Plotly at first place!
Version 1.43.0 is setup and it would possibly be released tomorrow.
There are other bug fixes and improvements related to
axis ticks&surfacetraces. In particular this PR should help improve the accuracy of data points on the surface. Although concerning small time-steps we are still working on the dataScale issue as well as local time offsets on 3D axes and webGL.Therefore this issue is still open.
But until it fixed, one practical solution may be to use minutes instead of the whole date in the axis ticks and then add the date info into the axis label using a break line.
Now with this PR being merged, your graph could look like this demo.
archmoj commentedon Dec 18, 2018
@ShaneHudson Also here is an alternative demo using superscripts & break-lines. Hope it may help.
archmoj commentedon Dec 19, 2018
@ShaneHudson FYI - here is the new release v.1.43.0.
etpinard commentedon Dec 20, 2018
@archmoj can we close this issue?
archmoj commentedon Dec 20, 2018
@etpinard No. It is not fixed yet.
ShaneHudson commentedon Dec 20, 2018
I've upgraded to the latest version of Plotly, so here's an updated graph. Looking across a minute.
archmoj commentedon Dec 20, 2018
@ShaneHudson
Curious to know if you noticed any improvement?
ShaneHudson commentedon Dec 21, 2018
I'm afraid not. I understand that the very small time scales are bound to throw it off, but the use-case is a raspberry pi that is uploading scans of radio frequency at regular intervals. The steps on the graph are caused by the scan being done in sweeps.
Another thing I noticed but probably related to this is that the 3D graph also struggles/fails when only one point in time is available. Is that expected behaviour?
1 remaining item
ShaneHudson commentedon Dec 21, 2018
Do note though that the bug does look different that it did originally, but my data has changed since then so I am looking at a small time range.
wuyuanyi135 commentedon Dec 29, 2019
+1.
https://codepen.io/wuyuanyi135/pen/bGNrvym
When the date difference is within one day, the display was problematic.
jfftonsic commentedon Jun 1, 2020
The bug still happens, here is a simple plotly.py that reproduces this kind of error
which results in

I managed to find a workaround which is uncommenting the lines
It will not fit every use case but... it's what I got right now after hours banging head on the wall.
jackparmer commentedon Sep 10, 2020
This issue has been tagged with
NEEDS SPON$ORA community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.
What Sponsorship includes:
Please include the link to this issue when contacting us to discuss.
hborchardt commentedon Jul 12, 2021
Hi, I would like to know if you are able to and would be interested in trying to move forward the related pull request that I opened in the gl-axes3d repository that you depend on? My main motivation in the PR is improving plotly :) and I saw that plotly maintainers are also maintaining some of the gl-vis repositories. @archmoj maybe?
Quost commentedon Aug 19, 2021
Hey, how are you doing? I found this issue, and there is something related to what I'm facing here.
You shared above a fiddle, and there is an axis label that is quite big, and this label enters the chart as you can see here:
I have some dates and would like to use them on my x labels, but it's not getting nice:

positron96 commentedon Feb 29, 2024
Any progress on this? I see there is a related PR for a project that haven't been updated in 4 years...
hborchardt commentedon Feb 29, 2024
Hi @positron96 , I still like my changes in that PR. Currently the pipeline for my project that uses plotly patches the plotly bundle with those adjustments, which is not ideal 😄 but works. I can post the script later, in case nothing will happen.
hborchardt commentedon Mar 7, 2024
Here's the patch as a bash script, to be called with the dist folder containing plotly as first argument: