2013-08-30 1 views

답변

1

예 있습니다. rpy2.robjects.lib.ggplot2에서 수동 매핑을 사용하는 경우 현재 누락되었지만이를 패치하는 방법은 다음과 같아야합니다.

import rpy2.robjects.lib.ggplot2 as ggplot2 

class ThemeClassic(ggplot2.Theme): 
    _constructor = ggplot2.ggplot2.theme_classic 
    @classmethod 
    def new(cls): 
     res = cls(cls._constructor()) 
     return res 

# Monkey patching ggplot2 
ggplot2.theme_classic = ThemeClassic.new 
+0

대단히 감사합니다! http://stackoverflow.com/questions/17736434/aligning-distinct-non-facet-plots-in-ggplot2-using-rpy2-in-python에 대한 아이디어가 있습니까? 해결되지 않은 문제 – user248237dfsf

관련 문제