Support MultiLineString in plotly.graph_objs.Scattermapbox
See original GitHub issueWhen plotting multiple lines on a MapBox map, there are two options:
- Make an array of
plotly.graph_objs.Data
for every new line. Benefits: Each line has separate options for hover, compatible with NaNs in the data. Drawbacks: Does not scale, each line seems to be on a new map layer that needs to be loaded separately; thus very slow for large numbers of lines. - Make one entry in
plotly.graph_objs.Data
, and pepper the data with NaNs. Withconnectgaps = False
(default, I think) no line will be drawn across the NaNs, thus splitting the lines. Benefit: Scales well, all lines are on one layer. Drawbacks: No option to connect NaNs that may naturally occur in the data. Shared options like coloring or hover-information for all lines.
It would be nice to be able to draw multiple lines on one map layer without resorting to hacks. Bonus for allowing separate options for lines on the same map layer.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
plotly.graph_objects.Scattermapbox — 5.11.0 documentation
The data visualized as scatter point, lines or marker symbols on a Mapbox GL geographic map is provided by longitude/latitude pairs in lon...
Read more >How to plot a scattermapbox with pandas?
I'm trying to plot lat/lon points on a scattermapbox with a ... type: MultiLineString in my geojson and not Polygon or Multipolygon?)
Read more >Lines on mapbox in Python - Plotly
Lines on Mapbox maps from GeoPandas¶. Given a GeoPandas geo-data frame with linestring or multilinestring features, one can extra point data and use...
Read more >Lines on maps in Python - Plotly
Below we show how to create geographical line plots using either Plotly Express with ... Given a GeoPandas geo-data frame with linestring or...
Read more >plotly.graph_objects.Figure — 5.11.0 documentation
Supported dict properties: activeselection. plotly.graph_objects.layout.Activeselec tion instance or dict with compatible properties. activeshape.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@alexcjohnson That would be great, thanks a lot! Please let me know if you need help testing a version, or if you need sample code with which you can experience the performance drop.
sorry to raise an old thread, but is there an example of a solution to this issue somewhere? I’m having the same problem, where plotting many lines using scattergeo works fine, but using mapbox is extremely slow. thanks!