pandas / matplotlib: faceting bar plots

前端 未结 3 1136
[愿得一人]
[愿得一人] 2021-02-09 20:47

I am making a series of bar plots of data with two categorical variables and one numeric. What i have is the below, but what I would love to do is to facet by one of the categor

3条回答
  •  自闭症患者
    2021-02-09 20:52

    Second example here: http://pandas-docs.github.io/pandas-docs-travis/visualization.html#bar-plots

    Anyway, you can always do that by hand, as you did yourself.

    EDIT: BTW, you can always use rpy2 in python, so you can do all the same things as in R.

    Also, have a look at this: http://pandas.pydata.org/pandas-docs/stable/rplot.html I am not sure, but it should be helpful for creating plots over many panels, though might require further reading.

提交回复
热议问题