使用Python Bokeh中的插值绘制图像像matplotlib?

问题描述 投票:0回答:2

有没有办法使用像Matplotlib中的插值使用Bokeh将2D数组绘制为图像?我可以使用一个例子进行绘图:https://bokeh.pydata.org/en/latest/docs/gallery/image.html然而,图像是粗糙的。我喜欢Matplotlib中插值工作的方式:https://matplotlib.org/gallery/images_contours_and_fields/interpolation_methods.html

我试图事先进行插值,但现在矩阵大小很大。

欢迎提出任何建议和意见。

问候,和

python image plot interpolation bokeh
2个回答
0
投票

如果你是working with a large dataset那么你可以尝试将Bokeh与像this example中的Datashader / HoloViews一起使用。放大时,Datashader可以根据您的Bokeh图中显示的数据动态创建新的高质量图像。


0
投票

不是答案,而是观察 - 我注意到通过image_url源绘制图像它在放大时显示为插值,而如果您在同一图像中读取并通过'image'从columndatasource显示它,则在缩放时显示为块状。我很想知道如何在缩放时使其显示为插值,例如像原始png图像一样。 Holoview / datashader将是一个很好的解决方案,但在我的情况下,我需要它离线工作/作为独立的html文件。

© www.soinside.com 2019 - 2024. All rights reserved.