如何从Python为rpy2中的ggplot设置geom_点填充?

如何从Python为rpy2中的ggplot设置geom_点填充?,python,ggplot2,rpy2,Python,Ggplot2,Rpy2,我使用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="Se

我使用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
设置。如何做到这一点?谢谢。

有一个晦涩难懂的窍门:需要设置
pch

看看这个答案:

我认为解决这个问题的唯一办法是使用
shape=1
并放弃
fill=
,我相信这会产生同样的效果?