Skip to content

Instantly share code, notes, and snippets.

@bchartoff
Last active August 29, 2015 13:56
Show Gist options
  • Save bchartoff/9301317 to your computer and use it in GitHub Desktop.
Save bchartoff/9301317 to your computer and use it in GitHub Desktop.
from rpy2 import robjects
r = robjects.r
r.library("ggplot2")
robjects.r("p = ggplot(aes(price, carat), data=diamonds) + geom_point() + facet_grid(clarity ~ color, scales = 'free')")
r.ggsave('faceted_plot.jpeg')
robjects.r('print(p)')
r['dev.off']()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment