Python Forum
display graph in columns and rows - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: display graph in columns and rows (/thread-19491.html)



display graph in columns and rows - william888 - Jul-02-2019

Hi,
for col in df[['age','num1','num2','num3','num4']]:
    grid = sns.FacetGrid(data=df,hue='predictor').map(sns.kdeplot,col)
    grid.add_legend()
    plt.show()
As per above code, I am able to generate the graph but it shows all the graphs in one column.

How can I break into eg. 2 rows and 3 columns?

Thanks.


RE: display graph in columns and rows - dataman - Jul-02-2019

hi

i can help you