I want a seaborn style pairgrid for some data that I am working with in R. I used something on the lines of https://towardsdatascience.com/python-seaborn-plots-in-r-using-reticulate-fb59cebf61a7
If I use pairplot I get one nice chart. But if I switch to pairgrid and add elements using map_offdiag then I get each child plot in its own window and an empty grid.
See code below for details. Below snippet with pairplot works. This is on lines of link copied above
library(reticulate)
data(iris)
sns <- import('seaborn')
mplt <- import('matplotlib', convert = TRUE)
plt <- import('matplotlib.pyplot')
sns$pairplot(r_to_py(iris[,1:4]),diag_kind = "hist", kind = "reg")
plt$show()
But the one below with pair grid shows each child plot in a separate window
library(reticulate)
data(iris)
sns <- import('seaborn')
mplt <- import('matplotlib', convert = TRUE)
plt <- import('matplotlib.pyplot')
g <- sns$PairGrid(r_to_py(iris[,1:4]))
g <- g$map_offdiag(sns$jointplot,kind = "kde")
plt$show()
I see an empty grid plot and then each child plot in its own window