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
scattergl fillcolor incorrect with multiple polygons in same trace when with fill: toself #2291
cc @Kully - this is going to be an issue with the Python county choropleth as well. Probably watch this issue and hold off on the WebGL approach until this is fixed:
A nice pared-down reproduction from @llnns in #2845:
Using scattergl with toself fill option results in a "ghost"/wrong/extra fill among the first points of each object. A minimal example creating three rectangles:
Notice that the result has 21 indices, 7 triangles, one more than the 6 needed for the 3 rectangles example. Also, I am not sure if it is intended, but in the pos array the last position of each rectangle is duplicated.
Hi all, still having this issue. Are there any plans to merge any of the proposed solutions into main plotly? This single bug fix could potentially fix so many of my plotting performance issues, so I'm eagerly looking forward to it! Hopefully it can be prioritized.
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.
Sponsorship range: $15k-$20k
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)
Thanks for the update :). Now another feature request for @github, if you're listening - we should have Gofundmes attached to issues! I'd gladly commit a few hundred to this issue if it could be done in a safe and organized way
Hi @ruijin , I tried manually updating the /Library/Frameworks/Python.framework/Versions/3.7/share/jupyter/lab/staging/node_modules/plotly.js/src/traces/scattergl and /Library/Frameworks/Python.framework/Versions/3.7/share/jupyter/lab/staging/node_modules/regl-line2d/index.js code and then I restarted my jupyter notebook to see if it worked. However, I still saw the same issue. I'm pretty sure the issue is on my end, but do you know how I can get my plotly.py library to "uptake" the changes that I manually made to plotly.js? I've tried deleting plotly.py's __pycache__ and restarting/rerunning to no avail.
Activity
jackparmer commentedon Jan 24, 2018
cc @Kully - this is going to be an issue with the Python county choropleth as well. Probably watch this issue and hold off on the WebGL approach until this is fixed:
Kully commentedon Jan 24, 2018
I actually found that
toselffill didn't work with just one polygon (ie list of coordinates defining a contained polygon)But I only checked in the Python API
jackparmer commentedon Jan 26, 2018
Here is what I get for a full US county map for SVG vs WebGL using
toself:alexcjohnson commentedon Mar 8, 2018
related: #2450
Kully commentedon May 28, 2018
Another example of the USA choropleth from here: https://plot.ly/python/county-choropleth/#the-entire-usa This is switching
scatter->scatterglin the figurefactory.jackparmer commentedon May 28, 2018
⬆️ Doesn't look like the recent
scatterglfill changes fixed things for this particular use caseetpinard commentedon May 28, 2018
There haven't been any scattergl fill changes since the regl push back January.
jackparmer commentedon May 28, 2018
Oh, I thought @dy had done some work on
regl-line2dfills after January. I guess I'm misremembering.etpinard commentedon May 28, 2018
He's done some work. But none of which is ready to get merged at this stage.
dy commentedon May 28, 2018
It is coming, after regl-text. Pls stay tuned)
alexcjohnson commentedon Jul 26, 2018
A nice pared-down reproduction from @llnns in #2845:
Using
scatterglwithtoselffill option results in a "ghost"/wrong/extra fill among the first points of each object. A minimal example creating three rectangles:https://codepen.io/anon/pen/NBvbbv
Results in:
Also, using the same data with
scattertype has the expected output:llnns commentedon Jul 26, 2018
Hey, maybe another hint here:
Using https://codepen.io/anon/pen/NBvbbv as an example.
It seems that the extra triangle comes from the triangulation function earcut. The block at
plotly.js/src/traces/scattergl/index.js
Lines 452 to 466 in 1ecef45
posarray:That it is been pass to earcut function as
earcut(pos, [])(I think at: https://github.com/a-vis/regl-line2d/blob/d4e34d3d38b20fce5bc0398e3cf30181d1f506a0/index.js#L519 ) resulting in the follow triangles indices array:Notice that the result has 21 indices, 7 triangles, one more than the 6 needed for the 3 rectangles example. Also, I am not sure if it is intended, but in the
posarray the last position of each rectangle is duplicated.etpinard commentedon Sep 19, 2018
A very nice example from @ErwanMAS in #3025
Please look .
https://codepen.io/erwanmas/pen/dqQrbR
The issue is generated by https://github.com/mapbox/earcut in https://github.com/a-vis/regl-line2d . AND earcut doesn't guarantee correctness
https://github.com/mapbox/earcut/blob/master/README.md
a simple console.log here https://github.com/a-vis/regl-line2d/blob/b9d56d51e1598c4ee7a9a5e0a733e920daf63c2d/index.js#L520 will output only 1 triangle , instead of 2 triangles
4 remaining items
rlele5 commentedon Jun 11, 2020
Hi all, still having this issue. Are there any plans to merge any of the proposed solutions into main plotly? This single bug fix could potentially fix so many of my plotting performance issues, so I'm eagerly looking forward to it! Hopefully it can be prioritized.
Another example posted here if needed: https://community.plotly.com/t/feature-request-for-gantt-gl-like-scatter-gl/37925/4
Tag: @archmoj, @etpinard
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.
Sponsorship range: $15k-$20k
What Sponsorship includes:
Please include the link to this issue when contacting us to discuss.
rlele5 commentedon Sep 12, 2020
Thanks for the update :). Now another feature request for @github, if you're listening - we should have Gofundmes attached to issues! I'd gladly commit a few hundred to this issue if it could be done in a safe and organized way
avsdev-cw commentedon Nov 9, 2020
I would also like to see this fixed, so +1 for that.
However that I feel that sponsership range is pretty excessive considering a bunch of people have already dug out what the root cause appears to be...
ruijin commentedon Dec 18, 2020
Created two PR to plotlyjs and regl
#5355
gl-vis/regl-line2d#49
I am happy to help with any further testing, as long as this got fixed.
rlele5 commentedon Dec 31, 2020
@ruijin , thanks for making the pull requests! I'm excited to try them out!
rlele5 commentedon Jan 14, 2021
Hi @ruijin , I tried manually updating the
/Library/Frameworks/Python.framework/Versions/3.7/share/jupyter/lab/staging/node_modules/plotly.js/src/traces/scattergland/Library/Frameworks/Python.framework/Versions/3.7/share/jupyter/lab/staging/node_modules/regl-line2d/index.jscode and then I restarted my jupyter notebook to see if it worked. However, I still saw the same issue. I'm pretty sure the issue is on my end, but do you know how I can get myplotly.pylibrary to "uptake" the changes that I manually made toplotly.js? I've tried deletingplotly.py's__pycache__and restarting/rerunning to no avail.archmoj commentedon Jan 14, 2021
Fixed via #5355.
Render interior ring outlines for shapefile polygons with holes