Facetting using the same variable across two dataframes in Seaborn (similar to ggplot2)?

Viewed 30

In R using ggplot2 I can plot information from two data frames on the same plot and facet using a variable name that is present in both data frames, as follows.

library(ggplot2)
df <- data.frame(x=runif(300),
                   y=runif(300),
                   z=rep(1:3, each=100))

df2 <- data.frame(x=runif(300),
                    y=runif(300) + 2,
                    z=rep(1:3, each=100))
p <- ggplot() + 
  geom_point(data=df, aes(x=x, y=y), col="firebrick") +
  geom_point(data=df2, aes(x=x, y=y)) + 
  facet_wrap(.~z) + 
  NULL
print(p)

enter image description here

Can this behaviour be replicated in python using Seaborn? Thanks!

0 Answers
Related