2016-08-17 19 views
0

私は2つのmatplotlib(海底)のFigureオブジェクトを両方とも異なるipythonセルで作成しました。は、同じipythonセル内に2つの海軍図形オブジェクトをレンダリングします

#One Cell 
fig_1_object = sns.factorplot(y='freq',x='d_fam',col='easy_donor',kind="bar",data=collection_d_fam) 
fig_1 = fig_1_object.fig 


#Two Cell 
fig_2_object = sns.factorplot(y='freq',x='d_fam',col='easy_donor',kind="bar",data=collection_c_fam) 
fig_2 = fig_2_object.fig 

どのようにして同じセルにそれらを「表示」することができますか。私はmatplotlibのインラインをオンにしました。

#third cell 
fig_1 
fig_2 
>>Only shows fig_2 

答えて

2
あなただけ IPython.displayモジュールから display機能をインポートする必要があり

from IPython.display import display 
import seaborn 

%matplotlib inline 

g1 = seaborn.factorplot(**options1) 
g2 = seaborn.factorplot(**options2) 

display(g1) 
display(g2) 
関連する問題