我想用散点图的上方和右边的直方图制作漂亮的散点图,因为在seaborn中可以使用jointplot:
我正在寻找有关如何实现这一目标的建议。实际上,我在安装熊猫时遇到了一些麻烦,而且我不需要整个Seaborn模块
在matplotlib中,如何绘制具有边际密度的二维密度,沿着 散点图 - 边缘直方图 - 在ggplot2 或 2D直方图中绘制直方图/边缘图?概括地说,
# I have --
A = a 2d numpy array >= 0
xdens ~ A.mean(axis=0)
ydens ~ A.mean(axis=1)
# I want --
pl.imshow( A )
pl.plot( xdens ) narrow, below A
pl.plot( ydens ) narrow, left of A, with the x y axes flipped
Run Code Online (Sandbox Code Playgroud)