How do you change the size of figures drawn with matplotlib?

后端 未结 19 3015
忘掉有多难
忘掉有多难 2020-11-21 06:01

How do you change the size of figure drawn with matplotlib?

19条回答
  •  情书的邮戳
    2020-11-21 06:36

    To increase size of your figure N times you need to insert this just before your pl.show():

    N = 2
    params = pl.gcf()
    plSize = params.get_size_inches()
    params.set_size_inches( (plSize[0]*N, plSize[1]*N) )
    

    It also works well with ipython notebook.

提交回复
热议问题