- 
                Notifications
    
You must be signed in to change notification settings  - Fork 635
 
Open
Description
As stated in the title, since I updated ggplot2 to version 4.0.0, theme_bw() and theme_minimal() look almost the same - the frame in theme_bw() is missing. This only happens in combination with plotly (version 4.11.0). Downgrading to ggplot2 version 3.5.2 solves this for now. Below is a reproducible example:
library(ggplot2)
library(plotly)
# UI
ui <- fluidPage(
  mainPanel(
    plotlyOutput("plot1"),
    plotlyOutput("plot2")
  )
)
# Server
server <- function(input, output) {
  output$plot1 <- renderPlotly({
    ggplotly(
      ggplot(mtcars, aes(x = wt, y = mpg)) +
        ggtitle("theme_bw") +
        geom_point() +
        theme_bw()
    )
  })
  
  output$plot2 <- renderPlotly({
    ggplotly(
      ggplot(mtcars, aes(x = wt, y = mpg)) +
        ggtitle("theme_minimal") +
        geom_point() +
        theme_minimal()
    )
  })
}
# Run app
shinyApp(ui = ui, server = server)
ggabernet
Metadata
Metadata
Assignees
Labels
No labels

