我创建了一个matplotlib图形(服务器上的matplotlib),并用mpld3.draw_figure (客户端的nodejs)显示它只给出了模糊的图像,类似于下面的图像:
How to 'turn off' blurry effect of imshow() in matplotlib?
mpld3.draw_figure(`chartBox-${round}`,chart,false,true)插值设置'nearest','none',没有改变任何东西:
plt.imshow(G,interpolation='nearest')我假设这是一些插值问题。也许也有0.5的移动,所以网格点1 -> 1.5,然后进行插值。
发布于 2019-09-03 05:57:19
首先切换回matplotlib 1.5.1,然后
mpl.use('Agg')解决了它
查看此处:Generating a PNG with matplotlib when DISPLAY is undefined
https://stackoverflow.com/questions/57745728
复制相似问题