2017-02-21 7 views
-5

plt.subplots(2,1, figsize=(10,8))の2つのパラメータを理解できません。 2つのプロットは2ですか?何が約1?plt.subplotsの2つのパラメータを理解するのが難しい

import matplotlib.pyplot as plt 
letter_prop = subtable/subtable.sum().astype(float) 
fig, axes = plt.subplots(2,1, figsize=(10,8)) 
letter_prop['M'].plot(kind = 'bar', rot = 0 , ax=axes[0], title="Male") 
letter_prop['F'].plot(kind = 'bar', rot = 0 , ax=axes[1], title="Female", legend = False) 

ありがとうございます!

+2

ドキュメントを読もうとしましたか? http://matplotlib.org/api/pyplot_api.html?highlight=subplots#matplotlib.pyplot.subplots – DeepSpace

答えて

0

documentationによれば、関数の署名は、2つの第1のパラメータは、グリッドの行と列の数である matplotlib.pyplot.subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True, subplot_kw=None, gridspec_kw=None, **fig_kw)

あります。

関連する問題