Skip to content
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

change scattermapbox symbols #1722

Open
c1au6i0 opened this issue Mar 14, 2020 · 1 comment
Open

change scattermapbox symbols #1722

c1au6i0 opened this issue Mar 14, 2020 · 1 comment

Comments

@c1au6i0
Copy link

c1au6i0 commented Mar 14, 2020

I would like to change the symbol in a scattermapbox but so far I have been unsuccessful. I suppose that I am just not using the right syntax, but I have not been able to get any hints from the documentation.

dat <- tibble::tribble(~latitude, ~longitude,
 "39.33359", "-76.63563",
 "38.85391", "-76.90812",
 "39.39105", "-76.83006")

fig <- dat  %>%
      plot_mapbox(
        lat = ~latitude,
        lon = ~longitude,
        mode = "markers",
        marker = list(symbol = 'car', size = 15, color='blue'),
        type = 'scattermapbox') 
fig %>%
    layout(
      mapbox = list(
        style = 'open-street-map',
        zoom = 5,
        center = list(lat = 39.33359, lon = -76.63563)))

It works fine with the default shape (circle).
Any idea?

@cpsievert
Copy link
Collaborator

That code should work, but currently only works with the default mapbox style due to this plotly.js bug plotly/plotly.js#4110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants