Is there a Python API for R's ggplot2? [closed

2019-06-22 09:18发布

My question is as simple as the title: i want to use R's ggplot2 but all my data handling is done in Python: is there a Python API for ggplot2, or an easy way to use ggplot2 through Python ?

4条回答
疯言疯语
2楼-- · 2019-06-22 09:34

Great answers so far, but don't forget about Bokeh: http://bokeh.pydata.org/

All sorts of great ways to visualize data, emulating ggplot2 in some ways, but also inspired by the amazing D3.js library.

Here's an example of a ggplot2-style graph: http://bokeh.pydata.org/docs/gallery/density.html

Ever wanted to make something like this in Python?

viz

Here's the quickstart guide: http://bokeh.pydata.org/docs/quickstart.html#quickstart

查看更多
冷血范
3楼-- · 2019-06-22 09:36

You can use RPy to call R from within python or there is ggplot for python if you do not like matplotlib.

查看更多
淡お忘
4楼-- · 2019-06-22 09:42

Check this out: https://github.com/yhat/ggplot

This is a python port of R's ggplot2.

查看更多
Animai°情兽
5楼-- · 2019-06-22 09:44

RPy allows you to call R from Python and provides with data conversion utilities. You can use ggplot2 function with the Graphics package, look at this section for some examples.

查看更多
登录 后发表回答