Description:
Here is a screenshot of my dashboard that I created with the shiny-package in R. It simply contains a static multiplot (via ggplot and grid.arrange).
Problem:
There are white areas in the figure which I want to be grey. Just as the background. I have to use grid.arrange to produce the figure.
Question:
How do I need to change the code to make the white areas grey? The code is attached below.
library(shiny)
library(grid)
library(gridExtra)
library(plyr)
library(dplyr)
library(tidyr)
library(ggplot2)
library(DT)
library(shinydashboard)
library(bubbles)
require(igraph)
require(rCharts)
library(formattable)
library(networkD3)
library(shinyjs)
data(MisLinks)
data(MisNodes)
ui=dashboardPage(
#skin = "black",
dashboardHeader(title = "MyTitle"),
dashboardSidebar(
"nothing here"
),
# Show a plot of the generated distribution
dashboardBody(
plotOutput("meinPiePlot")
)
)
server=function(input,output,session){
output$meinPiePlot=renderPlot({
Plot01=ggplot(NULL, aes(x="", y=mtcars$qsec, fill=mtcars$disp))+
geom_bar(width = 1, stat = "identity")+
coord_polar("y", start=0.8)+
theme(plot.background = element_rect(fill = "#ECF0F5",
colour = "#ECF0F5",
linetype = "solid"),
strip.background= element_rect(fill = "green",
colour = "green",
size = 0.5, linetype = "solid"),
panel.background=element_rect(fill = "#ECF0F5",
colour = "#ECF0F5"),
#aspect.ratio = 1 / 1.4,
axis.text.x=element_blank(),
legend.position="none"
)
Plot02=ggplot(NULL, aes(x="", y=mtcars$disp, fill=mtcars$mpg))+
geom_bar(width = 1, stat = "identity")+
coord_polar("y", start=0.8)+
theme(plot.background = element_rect(fill = "#ECF0F5",
colour = "#ECF0F5",
linetype = "solid"),
strip.background= element_rect(fill = "green",
colour = "green",
size = 0.5, linetype = "solid"),
panel.background=element_rect(fill = "#ECF0F5",
colour = "#ECF0F5"),
#aspect.ratio = 1 / 1.4,
axis.text.x=element_blank(),
legend.position="none"
)
grid.arrange(Plot01,Plot02, ncol=2)
})
}
shinyApp(ui, server)