pythonmatplotlibseaborn

How to increase the plot size in python while using seaborn


I have created some pairplots but cannot seem to increase the area of the plot.The code and the output are shown below for reference. Please find below a snapshot of the data. enter image description here Can someone please help me with this. enter image description here


Solution

  • You have to specify the size in the pairplot (or other plot) command.

    plt.figure()
    sns.pairplot(attrition_df, size=2.5, aspect=1)
    

    size equals the height of the facet (subplot) in inches, and the width in inches equals aspect*size