pandas / matplotlib: faceting bar plots

前端 未结 3 2165
故里飘歌
故里飘歌 2021-02-09 20:25

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:58

    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.

提交回复
热议问题