【发布时间】:2013-05-28 14:23:15
【问题描述】:
我正在使用 rpy2 用 ggplot 制作以下简单的情节:
from rpy2.robjects.lib import ggplot2
from rpy2.robjects import r, Formula
# R iris dataset
iris = r('iris')
p = ggplot2.ggplot(iris) + \
ggplot2.geom_point(ggplot2.aes_string(x="Sepal.Length", y="Sepal.Width", colour="Sepal.Width"), fill="white") + \
ggplot2.facet_wrap(Formula('~ Species'), ncol=2, nrow = 2)
p.plot()
除了fill="white" 部分之外,它都可以工作。我希望所有点的填充为白色,而颜色(即点边框颜色)由Sepal.Width 设置。如何才能做到这一点?谢谢。
【问题讨论】:
-
我认为解决这个问题的唯一方法是使用
shape=1并放弃fill=,我相信这会产生相同的效果吗?