Plotly charts not displaying in RStudio Viewer on Windows

When attempting to view a Plotly chart in the RStudio Viewer on a Windows system, the chart fails to display. Instead, the Viewer shows an empty area. The issue is specific to the RStudio Viewer and does not affect other visualization methods such as saving the chart as an image file or opening it in a web browser.

library(plotly)

mtcars <- 
  data.frame(
    mpg = mtcars$mpg,
    disp = mtcars$disp,
    hp = mtcars$hp
    )

p <- 
  plot_ly(
    mtcars,
    x = ~disp,
    y = ~mpg,
    type = "bar"
    )

This sounds familiar — did you do a google search to see if it's been addressed?

I used your title in a google search, and got this right away:

This topic was automatically closed 7 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.