How do I change the figure size with subplots?

后端 未结 2 1751
刺人心
刺人心 2020-11-28 17:31

I came across this example in the Matplotlib website. I was wondering if it was possible to increase the figure size.

I tried with

f.figsize(15,15)
<         


        
2条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-28 18:16

    If you already have the figure object use:

    f.set_figheight(15)
    f.set_figwidth(15)
    

    But if you use the .subplots() command (as in the examples you're showing) to create a new figure you can also use:

    f, axs = plt.subplots(2,2,figsize=(15,15))
    

提交回复
热议问题