Open
Description
I am following the example given here: https://plotly.com/r/mapbox-density-heatmaps/
However, I am unable to change the color of the coloraxis (or use showscale = F or move the colorbar over on x).
The plot won't work unless coloraxis = 'coloraxis' is specified, and there doesn't seem to be a way to style the coloraxis.
# population density available from https://data.humdata.org/dataset/worldpop-population-density-for-haiti
pop_den <- read.csv(data_path)
plot_ly() %>%
add_trace(
data = pop_den, type = 'densitymapbox', lat = ~Y, lon = ~X, z = ~Z,
coloraxis = 'coloraxis',
radius = 10) %>%
layout(
mapbox = list(
style = "carto-positron",
zoom = 6.5,
center = list(lon = -73.09, lat = 19.06),
coloraxis = list(colorscale = "Grey", colorbar_x = 1.5)
)
)
Metadata
Metadata
Assignees
Labels
No labels