Kashish Jain
Kashish Jain

Reputation: 21

How to arrange different plots in rows and column in python if we are making plots by using plotnine package?

In R, we could plot each graph independently and then arrange all or some of the graphs easily by packages like gridExtra.

p1 <- ggplot(aes(x1,y1), data=df) + geom_point()
p2 <- ggplot(aes(x2,y2), data=df) + geom_point()

grid.arrange(p1, p2, ncol=1)

However, can we do the same thing in Python with PLOTNINE?

Upvotes: 2

Views: 1799

Answers (1)

Carlo
Carlo

Reputation: 85

I had the same problem and found a solution. It is the patchworklib package. It allows you to arrange multiple plotnine plot, as you would do with ggplot in R. Give it a look on github: https://github.com/ponnhide/patchworklib

Upvotes: 2

Related Questions