-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Support SVG output for bokeh #8
Comments
Yes we can do this! I'll add support for this over lunch. BTW, how do you set the dpi on a Bokeh plot? |
As far as I know you can't currently. Bokeh itself always deals in css pixels, when exported the DPI is up to the browser, and apparently selenium always uses 92 DPI. Hm, apparently that is not true this blogpost says there is an easy way to set DPI. But that should be implemented in bokeh. Does pandoc-plot currently support multiple bokeh plots/layouts? Bokeh SVGs unfortunately don't support this, but I don't think there is any good way around that. |
pandoc-plot can only include one file per figure. I have not tested using layouts, but there's no reason it should not be possible in the near future. Right now, for technical reasons, pandoc-plot determines the most recent bokeh I think the most general plotting object in Bokeh is a |
So SVG support is in (I just tested it). I also changed (in 8599869) the way the "current" figure is found, which implies that plots made with Is there anything else related to bokeh that you think we should include in the next release? |
There is actually one more thing which bothers me with bokeh plots:
So if $DATA is big, this just takes a long time to parse. One possible solution is moving the first script tag with all the data to the bottom of the document. This can actually be circumvented by using bokeh.sources.AjaxDataSource and putting the data as separate json files. All in all I don't think it's worth solving this in pandoc-plot. |
One more thing came to my mind, although unrelated to bokeh: Currently pandoc-plot caches figures on the sourcecode used. When figures depend on external code or data, these dependencies are not taken into account and the figures are not rerendered when the dependencies change. Would it be possible to incorporate this? One possible solution would be an option A different solution would be an optional user defined function which evaluates whether the figure needs regeneration. This seems very complicated. Another option could be to inject a function "open" into the code and automatically registering dependencies whenever this function is used to read files. |
Actually, pandoc-plot parses Edit: it appears that replacing |
I can see adding a parameter |
The change is live in the latest version (0.9.0.0). Thank you for your suggestion. |
Currently pandoc-plot with the bokeh toolkit only supports png and html output. Bokeh itself can output svgs source. This is especially relevant for bokeh as the bokeh png export unfortunately ignores DPI and always generates pngs with 92 DPI (ticket) which makes it less useful for pdf files.
The text was updated successfully, but these errors were encountered: