Skip to content

plot_mapbox: example from book not working after updating plotly #1707

@werkstattcodes

Description

@werkstattcodes

Many thanks for your invaluable contribution with the plotly package!

I tried to recreate one map from your very helpful book on plotly & co (chapter 4.1.1).
Here the link.

library(plotly)
plot_mapbox(maps::canada.cities) %>%
  add_markers(
    x = ~long, 
    y = ~lat, 
    size = ~pop, 
    color = ~country.etc,
    colors = "Accent",
    text = ~paste(name, pop),
    hoverinfo = "text"
  )

The map is produced as intended when using your RStudio Cloud version which uses Plotly 4.9.0.9000. After updating the package to the latest CRAN version (which I use on my local machine, 4.9.2) the code produces only the dots, but no map in the background. Below a screenshot of the graph. I assume that's a bug, no?

Many thanks again.

Capture

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions