Issue
I have two matplotlib (seaborn) figure objects both made in different ipython cells.
#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
How can I "show" them one after another in the same cell. I have matplotlib inline turned on.
#third cell
fig_1
fig_2
>>Only shows fig_2
Solution
You just need to import the display
function from the IPython.display
module:
from IPython.display import display
import seaborn
%matplotlib inline
g1 = seaborn.factorplot(**options1)
g2 = seaborn.factorplot(**options2)
display(g1)
display(g2)
Answered By - Paul H
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.