远程连接Linux服务器使用matplotlib显示图片

在原有代码的开头加入如下两行代码

import matplotlib as mpl
mpl.use('tkagg')

你可能感兴趣的:(matplotlib)