Are there easy fixes or alternatives to using XQuartz for R plots? I’m running R-4.4.3 (emacs/ess) on macos 15.4.1 and have xquartz-2.8.5 installed. Most of the time plotting in R works well enough (I tend to use ggplot2, I don’t know if it happens as often with base plots). Occasionally (several times a week), “something” happens with the plot window, and from then on that R process can no longer plot anything more. The “something” is not well defined for me yet, I think it’s a mouse-wheel or mouse-click or similar; the snark in me says “well don’t do that”, but I cannot nail down exactly how/when it breaks, it just does.
When it happens, the current device window is still open, but it has a mac spinning-colorwheel, no new plotting commands work, and I cannot close the window myself. I cannot dev.off() it, nor does dev.new() give me a new plotting window. When this happens for a particular R process, my only options for plotting are either (a) close the R process and start over, or (b) manually plot to a PDF or similar one-shot graphics device, viewing in a different app. There are several related issues I can find: https://github.com/XQuartz/XQuartz/issues/431, specific to macos 15.4 or newer I think; some mention of “minimizing windows” but I don’t minimize my plot windows, so perhaps not that https://github.com/XQuartz/XQuartz/issues/168, closed as “not planned”, though this one is much older than the first (431) issue I’ve tried using something like |httpgd| <https://github.com/nx10/httpgd/> since it can (mostly) provide an “always updating graphics device” for example without xquartz. Unfortunately, with some other packages (namely plumber that I use frequently-enough) it can put the R’s REPL into an unbreakable state (#215 <https://github.com/nx10/httpgd/issues/215>). If that were fixed I’d be a lot more comfortable using that as my workaround. My research has not shown any other options for fixing or replacing xquartz with a more stable solution. Are there good ways to troubleshoot and try to fix the xquartz issue? Does anybody else have a workaround or alternative that is less unwieldy than pdf(..); plot(..); dev.off()? Thanks, Bill ​ ​ [[alternative HTML version deleted]] _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac