我正在复制rpy2教程提出的测试。请参阅以下代码:
import math, datetime
import rpy2.robjects.lib.ggplot2 as ggplot2
import rpy2.robjects as ro
from rpy2.robjects.packages import importr
base = importr('base')
datasets = importr('datasets')
mtcars = datasets.mtcars
gp = ggplot2.ggplot(mtcars)
pp = gp + \
ggplot2.aes_string(x='wt', y='mpg') + \
ggplot2.geom_point()
pp.plot()
但是,我发现以下错误:
AttributeError:'ListVector'对象没有属性'plot'
感谢您的帮助