Change ggplot with dark theme

I have watched the conference of Mr Cheng, and I wanted to try the shinyOptions(plot.autocolors = TRUE) but it doesn't change anything.
Am I doing something wrong? here is my simple example

library(shiny)
library(bs4Dash)
library(ggplot2)
library(sass)
library(bslib)

library(shiny)
shinyOptions(plot.autocolors = TRUE)

ui <- bs4DashPage(header = bs4DashNavbar(),
                  sidebar = bs4DashSidebar(),
                  body = bs4DashBody(
                    plotOutput("plot")
                  )
)

server <- function(input, output, session) {
  output$plot <-renderPlot({
    ggplot(iris,aes(x = Sepal.Length,y = Sepal.Width)) + geom_point()  
  })
}

shinyApp(ui, server)

...

I think I find out how to correct it from here link

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.