plotly / plotly.py

The interactive graphing library for Python :sparkles: This project now includes Plotly Express!
https://plotly.com/python/
MIT License
15.99k stars 2.53k forks source link

Some Scattermapbox Symbols Not Available #1804

Open ghost opened 4 years ago

ghost commented 4 years ago

This issue was first reported in https://github.com/plotly/plotly.py/issues/891, but it doesn't seem like it was fully understood or addressed. I found another post on the community forums about the same thing at https://community.plot.ly/t/solved-symbol-changes-not-showing-up-with-scattermapbox/1638

I am able to use only a subset of the icons found on https://labs.mapbox.com/maki-icons/. When I use "bus" or "embasssy" as the symbol, I see the icon without issue. When I change the symbol to "home" or "wheelchair", the icon is not rendered. It's as though only a subset of the mapbox icons are actually available. An excerpt from my code is copied below. This is intended to show a "wheelchair" icon, but it does not appear to work.

        vehicle_fig.add_trace(go.Scattermapbox(
            name='Stop',
            lat=stop_lat,
            lon=stop_lon,
            mode='markers',
            marker=go.scattermapbox.Marker(
                size=15,
                symbol='wheelchair'
            ),
            showlegend=False,
            text=stop_address,
            hoverinfo='text',
            hoverlabel=dict(bgcolor='#735139',
                            font=dict(color='white',
                                      size=20))
        ))
theGreatRaphael commented 4 years ago

I'm facing the same problem right now. The icon heart e. g. is also not working.

Joel-Wong0794 commented 4 years ago

Hi, Has anyone found a solution? I am only able to plot points when I set symbol = "circle".

mindless-bureaucrat commented 4 years ago

Same for me. I'm not connecting to a mapbox server, instead using WMS basemaps. Could that be the problem?

BerserkerGaruk commented 4 years ago

I found a solutions for this. Plotly/Dash uses the Maki icon set made by mapbox icons. Most of the icons in this icon set are not loaded into the default themes in mapbox such as monochrome. I was able to get icons other than circle to work by editing the theme I was using in mapbox studio by dragging the .svgs from the maki icon set into the browser window and then publishing the theme changes. After waiting for about 10 mins I was able to set and see icons other than the circle.

khurramkhalil commented 2 years ago

I am facing the exact same problem right now. The icon airport/airfield etc. are not working.

nicolaskruchten commented 2 years ago

It's important to note that the special icon symbols only work when using a Mapbox-provided style, per the documentation: https://plotly.com/python/scattermapbox/#set-marker-symbols

AIMPED commented 6 months ago

Hey there,

The graph provided in the link provided by @nicolaskruchten renders just fine with my mapbox token. However, if y change the "airport" icon to "cross", the cross is not rendered. See also this discussion on the plotly forums.

https://community.plotly.com/t/scattermapbox-marker-symbol/82957

gvwilson commented 1 month ago

@archmoj will this be addressed by your recent work?

amctier-i360 commented 1 week ago

@BerserkerGaruk How did you import your custom style after publishing? I can't find any documentation around importing custom styles from MapBox Studio.

@gvwilson Do you have an estimate for when this might get addressed?