我想让 R Shiny Server 上的 ggplots 透明。我的绘图 ui.R 如下:
plotOutput("malPie", width="95%")
在 server.R 中我的绘图函数如下:
c <- ggplot(dataFrame, aes(x=factor(nrow(dataFrame)),fill=graphX),environment=environment()) + geom_bar(width = 1)
print(c + coord_polar(theta = "y")+ xlab(xLabel)+ylab(yLabel)+ labs(fill=legendTitle)+ theme(
panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
panel.background = element_blank(),
plot.background = element_blank()
))
以及它的名称:
sub <- data
sub <- subset(sub,sub$mal_tested=="1")
drawGraph("pie",sub,factor(sub$mal_tested_pos),"Malaria Tests Done",NULL,"Malaria Tested Positive","Malaria")
But the graph rendered still has a white background and I want it to be transparent, not white. How do I achieve this? I have attached an image with an arrow showing the plot.
我如何改变这个背景?请帮我。