简体   繁体   English

散景变化质量出口图

[英]Bokeh change quality export plot

I am trying to export some grid into either png or svg but with svg option—as the doc states-the plots are exported as multiple files. 我正在尝试将某些网格导出到png或svg中,但带有svg选项(如doc所述),将图导出为多个文件。 So the only option is png . 因此,唯一的选择是png (For some reason if I use the toolbar, I only get the first plot and not the other). (由于某种原因,如果使用工具栏,我只会得到第一个图,而不会得到另一个图)。

But the quality of the png is terrible. 但是png的质量很糟糕。 Is there an option to set dpi or whatever? 有设置dpi的选项吗? Even I you try to save graphs on the official documentation, you obtain poor quality. 即使我尝试将图形保存在官方文档中,也会得到较差的质量。

I really like Bokeh and found it nicer to use that any other libs but this quality export is critical for me (publication purpose). 我真的很喜欢Bokeh,并且发现使用其他任何libs更好,但是这种高质量的导出对我来说至关重要(出版目的)。

在最新版本的Bokeh中, export_png接受widthheight参数,您可以根据需要将其设置为任意大,例如:

export_png(p, "plot.png", width=2400, height=1000)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM