Error trying to plot histogram

When I tried to plot a histogram in Rstudio, I got the following error:
Error in dev.control(displaylist = "enable") : dev.control() called without an open graphics device

This is what the traceback shows:
7. stop("dev.control() called without an open graphics device")
6. dev.control(displaylist = "enable")
5. device.call(...)
4. trellis.device()
3. printFunction(x, ...)
2. print.trellis(x)

  1. (function (x, ...) UseMethod("print"))(x)

I'm using macOS and have basically no experience with Rstudio.

1 Like

did you find a solution?

I've seen this backtrace asked about in a number of places, but no good solution was provided.

Could you offer a minimal reprex of the code you ran which created this error message?

If it's just hist(...), I'd restart R (in RStudio, Session >> Restart R) and try again.

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