loading ggplot2 (colorspace, actually) opens up x11

坚强是说给别人听的谎言 提交于 2019-11-29 21:45:18

问题


Whenever I so much as load ggplot2, X11 jumps into action (hogging resources).

library(ggplot2)

Is what I do, and boom – X11

The thing is, I don't want to use X11, nor do I want it to be open – I want to use Quartz and the build-in graphics in RStudio.

Whenever I close X11, so goes my R session.

My setup:

  • OS X Yosemite 10.10.2
  • R 3.1.2
  • Platform: x86_64-apple-darwin13.4.0 (64-bit)
  • ggplot 1.0.0
  • XQuartz 2.7.7 (xorg-server 1.15.2)
  • OS X also recently (yesterday?) updated the Command Line Tools to 6.2

This problem occurs:

  • In RStudio
  • using a ST3 REPL package
  • the R console

How did I mess this up, and how I can I stop this madness?

Update: Turns out (see comments), the package colorspace in version 1.2-5 is at fault, not ggplot2.

Update: The problem seems to be solved as of colorspace version 1.2-6.


回答1:


As mentioned in the comments and the github issue in the ggplot2 page, this is cause by the package colorspace version "1.2-5". You can wait to a new version of the package with a fix. Or, a temporary solution is to install a previous version of colorspace. If you have the devtools package installed you can easily do:

library(devtools)
install_version("colorspace", "1.2-4")


来源:https://stackoverflow.com/questions/28952128/loading-ggplot2-colorspace-actually-opens-up-x11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!