How to make inline plots in Jupyter Notebook larger?

后端 未结 9 1593
慢半拍i
慢半拍i 2020-12-12 08:38

I have made my plots inline on my Ipython Notebook with \"%matplotlib inline.\"

Now, the plot appears. However, it is very small. Is there a way to ma

9条回答
  •  半阙折子戏
    2020-12-12 08:57

    A quick fix to "plot overlap" is to use plt.tight_layout():

    Example (in my case)

    for i,var in enumerate(categorical_variables):
        plt.title(var)
        plt.xticks(rotation=45)
        df[var].hist()
        plt.subplot(len(categorical_variables)/2, 2, i+1)
    
    plt.tight_layout()
    

提交回复
热议问题