matplotlibの scatterplot-with-marginal-histograms-in-ggplot2 または 2D プロット with histograms / marginalsの線に沿って、その限界密度で 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
2017 年に追加: seaborn.jointplotの素敵な例を参照してください。これもSO にあります。(質問は、シーボーンの前の2013年にありました。)