如何将cairo设置为R中x11()的默认后端?

编程入门 行业动态 更新时间:2024-10-08 18:39:32
本文介绍了如何将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()的默认后端?

本文发布于:2023-11-25 21:40:23,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:设置为   如何将   后端   cairo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!