With Python Bokeh export_png function, we can export an object to png file. However, I cannot find any way to specify the resulted png file size / resolution.
I found that I used the same code and got different png files in Windows and Linux. In Windows, the resolution is much lower.
I understand we can use export_svgs()
to have better figure file. But compared with export_png()
, export_svgs()
has many limitations. We cannot use export_svgs()
on div, column or row objects.
In recent enough versions, export_png
accepts width
and height
parameters:
https://docs.bokeh.org/en/latest/docs/reference/io.html#bokeh.io.export_png
If they are not available in your current install then you will need to update your Bokeh installation to something newer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With