Can't use matplotlib.use('Agg'), graphs always show on the screen

前端 未结 3 1112
栀梦
栀梦 2021-01-03 06:04

I\'m studying matplotlib and don\'t know how to just save the graph and not print it on the screen.

So I\'ve done some research on the Internet, many answers said

3条回答
  •  生来不讨喜
    2021-01-03 06:58

    You can try to switch the backend. Apparently Spyder loads matplotlib before you do, and use has no effect. This may be helpful: How to switch backends in matplotlib / Python

提交回复
热议问题