问题描述
在更新到R 2.15后,ggplot中的alpha通道似乎不再起作用。$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ b
完美无缺,但
qplot(rnorm(100),rnorm(100),color =#cc000044)
这是一个已知的问题吗?我不是'能够找到任何关于在线...
谢谢!
我可以使用R-2.15.0和ggplot2 0.9.0来复制这个问题。
正如Ben指出的那样,指定ggplot2中半透明的标准方法是提供显式 alpha
参数。您应该尝试将此用于所有新的绘图代码。
我认为可以创建一个案例ggplot应该通过颜色参数来支持alpha的传统规范。如果你对此有强烈的感觉,那么。
after updating to R 2.15, the alpha channel in ggplot does not seem to work anymore.
plot(rnorm(100),rnorm(100),bg="#cc000055",pch=21)
works perfectly fine but
qplot(rnorm(100),rnorm(100),color="#cc000044")
does not! Also, the alpha() function from the ggplot2 package is not found anymore (I also tried ggplot2::alpha().
Is that a known problem? I wasn't able to find anything about online...
Thanks!
I can replicate the issue using R-2.15.0 and ggplot2 0.9.0.
As Ben noted, the standard way of specifying translucency in ggplot2 is to provide an explicit alpha
argument. You should try to use this for all new plotting code.
I think a case could made that ggplot should support legacy specification of alpha via the colour argument. If you feel strongly about this, then file an issue.
这篇关于ggplot2中的alpha通道在安装2.15后不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!