seaborn (matplotlib のラッパー) という名前のパッケージで 2 つの変数の共同分布を描画しようとしています。最終的には、次のようなものを取得したい: http://web.stanford.edu/~mwaskom/software/seaborn/examples/hexbin_marginals.html
問題は、さまざまな長さの配列を渡すと、シーボーンが私を罵倒することです。仮定する、
var1 = [1,1,1,1,1,2,2,2,2,3,3,5,7]
var2 = [1,1,1,1,2,2,2,3,3,3,4,4,5,5,6,6,7,9,10,13]
次に、これを書くと:
import seaborn as sns
sns.jointplot(var1, var2, kind='hex')
それは投げます
ValueError: operands could not be broadcast together with shapes (13) (20)
シーボーンをこれと和解させる方法を知っている人はいますか?