如何将cairo设置为R中x11()的默认后端? [英] How to set cairo as default backend for x11() in R?

查看:288
本文介绍了如何将cairo设置为R中x11()的默认后端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ubuntu 12.04上使用ggplot2。默认情况下,我的x11类型设置为Xlib。因此,当我在qplot中使用更平滑时,出现以下错误:

此设备不支持半透明度:每页仅报告一次。

但是,如果我调用x11(type =cairo),一切正常。



如何获得cairo作为x11的默认后端?

解决方案

定义另一个设置正确类型的函数'x11':

  x11 = function(...)grDevices :: x11(...,type ='cairo')


I am using ggplot2 on ubuntu 12.04. By default my x11 type is set to Xlib. So when I use a smoother in qplot, I get an error like:

"semi-transparency is not supported on this device: reported only once per page".

However, if I call x11(type="cairo"), everything works fine.

How do I get cairo as the default backend for x11?

解决方案

Define another function 'x11' which sets the proper type:

x11 = function (...) grDevices::x11(...,type='cairo')

这篇关于如何将cairo设置为R中x11()的默认后端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆