【问题标题】:geom_dotplot in rpy2?rpy2中的geom_dotplot?
【发布时间】:2013-02-22 01:29:03
【问题描述】:

当我尝试使用 gplot2.geom_dotplot 时出现错误:

AttributeError: 'module' object has no attribute 'geom_dotplot'

这个函数在 Rpy2 中有不同的名字吗?谢谢。

【问题讨论】:

    标签: python ggplot2 rpy2


    【解决方案1】:

    只是缺少该函数的映射。这是 rpy2 的一个错误。该修复程序将很快在存储库中(将与版本 2.3.4 一起发布)。

    与此同时,可以将以下内容添加到您的代码中。:

    from rpy2.robjects.lib import ggplot2
    
    class GeomDotplot(ggplot2.Geom):
        _constructor = ggplot2.ggplot2_env['geom_dotplot']
    ggplot2.geom_dotplot = GeomDotplot.new
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-01-14
      • 1970-01-01
      • 1970-01-01
      • 2019-10-21
      • 2012-06-25
      • 2019-10-21
      • 2023-01-22
      相关资源
      最近更新 更多