R 侧栏面板背景更改

R 侧栏面板背景更改,r,shiny,R,Shiny,我在侧边栏面板中有一个维恩图,需要删除图的背景(白色)并添加与侧边栏面板相同的内容 有什么建议吗? 代码是这样的 library(shiny) ui <- fluidPage( titlePanel("Old Faithful Geyser Data"), sidebarLayout( sidebarPanel( sliderInput("bins", "Number of b

我在侧边栏面板中有一个维恩图,需要删除图的背景(白色)并添加与侧边栏面板相同的内容 有什么建议吗? 代码是这样的

library(shiny)
ui <- fluidPage(
titlePanel("Old Faithful Geyser Data"),
sidebarLayout(
    sidebarPanel(
        sliderInput("bins",
                    "Number of bins:",
                    min = 1,
                    max = 50,
                    value = 30),imageOutput("Vennout")),mainPanel(
       plotOutput("distPlot"))))
    server <- function(input, output) {
    set1 <- paste(rep("word_" , 200) , sample(c(1:1000) , 200 , replace=F) , sep="")
    set2 <- paste(rep("word_" , 200) , sample(c(1:1000) , 200 , replace=F) , sep="")
  output$Vennout <- renderPlot({

   vennplot <-({venn.diagram(
x = list("one" = set1,
  "two" = set2),
filename = NULL,
fill = c("orange", "blue"),
alpha = c(0.5,0.5),
label.col = "black",
cat.col = c("cornflowerblue", "pink"),
cat.default.pos = "text",
scaled = FALSE
    )})        grid.newpage()
        grid.draw(vennplot)})}
       shinyApp(ui = ui, server = server)
库(闪亮)

ui设置线条和填充的颜色,使其与亮灰色匹配-#f5:


这篇文章的可能副本:,我们只需要找到匹配的灰色:
grid.draw(rectGrob(gp=gpar(fill=“grey”))
grid.newpage()
grid.draw(rectGrob(gp = gpar(col = "#F5F5F5", fill = "#F5F5F5")))
grid.draw(vennplot)