【发布时间】:2016-09-19 16:52:13
【问题描述】:
到目前为止,这是我所拥有的:
f1 <- list(
family = "Arial, sans-serif",
size = 25,
color = "white"
)
f2 <- list(
family = "Old Standard TT, serif",
size = 14,
color = "black"
)
a <- list(
title = "SALES PER SONG",
titlefont = f1,
showgrid = FALSE,
showticklabels = TRUE,
showline=TRUE,
tickangle = 45,
tickfont = f2
)
salesplot <-plot_ly(producersales, type="scatter", x=Producer, y=SalesPerSong, color=SongRange, colors=cols, mode="markers", size=SalesPerSong) %>%
layout(xaxis = a, yaxis = a)
我尝试在layout() 中的 x 和 y 轴信息之后添加paper_bgcolor=#00000000, plot_bgcolor=#00000000,但是当我运行命令时,我得到了加号。我不知道该怎么做,所以任何帮助表示赞赏。谢谢!
【问题讨论】:
-
请注意,透明背景也将应用于导出的图像。这会在某些图像查看应用程序中使黑色标签文本不可见,包括 Windows 10 的默认照片工具。
-
请注意,
paper_bgcolor=#00000000返回一个加号,因为#将此后同一行中的所有内容都作为注释,从而否定了您的右括号。替换为paper_bgcolor = '#00000000'