R闪亮:删除ggiraph背景

R闪亮:删除ggiraph背景,r,shiny,background-color,ggiraph,R,Shiny,Background Color,Ggiraph,我希望我的ggiraph绘图在光泽有一个透明的背景。我的ui.R如下所示: girafeOutput("pcaPlot") p <- ggplot(dataGG, aes(PC1, PC2)) + geom_point_interactive(aes_string(colour = factornames[1], tooltip = "filename")) + ggtitle("PCA plot of the calib

我希望我的ggiraph绘图在光泽有一个透明的背景。我的ui.R如下所示:

girafeOutput("pcaPlot")
p <- ggplot(dataGG, aes(PC1, PC2)) +
    geom_point_interactive(aes_string(colour = factornames[1], tooltip = "filename")) +
    ggtitle("PCA plot of the calibrated, summarized data") +
    xlab(paste0("PC1, VarExp: ", percentVar[1], "%")) +
    ylab(paste0("PC2, VarExp: ", percentVar[2], "%")) +
    theme(plot.title = element_text(hjust = 0.5)) +
    coord_fixed(ratio = sd_ratio) +
    scale_color_manual(values = gg_color_hue(10))

output$pcaPlot <- renderGirafe({girafe(ggobj = p, options = list(
    opts_sizing(width = 1),
    opts_toolbar(saveaspng = FALSE)))})
和my server.R用于绘制以下内容:

girafeOutput("pcaPlot")
p <- ggplot(dataGG, aes(PC1, PC2)) +
    geom_point_interactive(aes_string(colour = factornames[1], tooltip = "filename")) +
    ggtitle("PCA plot of the calibrated, summarized data") +
    xlab(paste0("PC1, VarExp: ", percentVar[1], "%")) +
    ylab(paste0("PC2, VarExp: ", percentVar[2], "%")) +
    theme(plot.title = element_text(hjust = 0.5)) +
    coord_fixed(ratio = sd_ratio) +
    scale_color_manual(values = gg_color_hue(10))

output$pcaPlot <- renderGirafe({girafe(ggobj = p, options = list(
    opts_sizing(width = 1),
    opts_toolbar(saveaspng = FALSE)))})
p通过
bg=“transparent”
girafe