Matplotlib savefig does not save axes

前端 未结 2 1432
说谎
说谎 2021-01-13 09:39

I\'m trying to save a figure that works fine in IPython inline but does not save the figure to disk with the axes and titles included.

I am using TKAgg backend by de

2条回答
  •  轮回少年
    2021-01-13 10:18

    I was having the same problem using Jupyter notebook and the command: %matplotlib notebook. The figure showed correctly in the notebook but didn't print axis and titles when saved with fig.savefig(). I changed %matplotlib notebook to %matplotlib inline and that solved the problem.

提交回复
热议问题