[英]Change title position in plotly R
我为我正在使用的数据集创建了世界地图,但是,绘图的标题位于图表上方,两者之间有一个巨大的空间。
map_World <- list(
scope = 'world',
lakecolor = toRGB('white'))
Map4 <- plot_geo(regions) %>%
add_trace(
z = ~column1.x, locations = ~`ISO`,
color = ~column1.x, colors = c("red", "blue", "green")
) %>%
colorbar(title = "Legend",x = 1, y = 0.8) %>%
layout(title = "Sub indices for the different dimensions",
geo = map_World)
我希望标题正好在图表上方,但它不起作用。
我相信你可以调整图表标题属性:
https://github.com/plotly/plotly.js/pull/3276
尝试你的布局,如:
layout(title = list(text = "Sub indices for the different dimensions", y = 0.8),
geo = map_World)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.