Я хотел бы сделать этот тип рисунка ниже в R, который, я думаю, представляет собой комбинацию маргинальных гистограмм и объекта geom_hex.Изначально это граф морских племен matplotlib.
Я не могу заставить его поговорить с RColorbrewer.Есть мысли почему?
![enter image description here](https://i.stack.imgur.com/BPcOU.png)
Пока у меня есть:
require(ggplot2)
require(RColorBrewer)
require(ggExtra)
bl<-data.frame(beta=rnorm(100),lambda=rnorm(100))
p<-ggplot(bl,aes(x=beta,y=lambda))+
stat_bin_hex()+
#scale_fill_gradient(palette = "Greens") Neither of these work
#scale_fill_continuous(palette = "Greens")+
scale_fill_brewer()+
theme_classic()
ggExtra::ggMarginal(p, type = "histogram")
Оригинальный код:
x, y = np.random.multivariate_normal(mean, cov, 1000).T
with sns.axes_style("white"):
https://seaborn.pydata.org/tutorial/distributions.html
sns.jointplot(x=x, y=y, kind="hex", color="greens");