Set size of subplot in matplotlib

前端 未结 1 1824
萌比男神i
萌比男神i 2020-12-31 05:55

I wonder how to set the size of the subplot when figure contains multiple subplots (5 × 2 in my case). No matter how big I allow the whole figure to be, the subplots always

相关标签:
1条回答
  • 2020-12-31 06:20

    Just switch figure size width and height from:

    fig = plt.figure(figsize=(20, 8))
    

    to:

    fig = plt.figure(figsize=(8, 20))
    

    to use the whole page for your plots.

    This will change your plot from:

    to:

    0 讨论(0)
提交回复
热议问题