有没有可能得到描述任意matplolib
/seaborn
绘图的numpy
数组而不显式地将其保存为图像文件并读取它
例如,假设我有一个附加的图像,它是数组的sns.kdeplot()
。现在,我可以得到这个图的numpy
数组而不需要先saving it to a file读取它吗?比如:
img = sns.kdeplot(arr)
img_arr = img.some_function() # Returns a numpy array describing the plot
Tags:
fig.canvas.tostring_rgb()
会有帮助:相关问题 更多 >
编程相关推荐