Set size of subplot in matplotlib

前端 未结 1 1812
萌比男神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)
提交回复
热议问题