Skip to content
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

Plots containing arrows fail to render correctly with svg output backend. #8744

Closed
Haptein opened this issue Mar 15, 2019 · 1 comment · Fixed by #10402
Closed

Plots containing arrows fail to render correctly with svg output backend. #8744

Haptein opened this issue Mar 15, 2019 · 1 comment · Fixed by #10402

Comments

@Haptein
Copy link

Haptein commented Mar 15, 2019

Also exporting a plot with output_backend='svg' when it contains arrows throws the following warning/exception:

WARNING:bokeh.io.export:The webdriver raised a TimeoutException while waiting for a bokeh:idle' event to signify that the layout has rendered. Something may have gone wrong.

It does not matter wether it is exported as svg or png, and the resulting image looks the same. Plot looks the same when using show() but no exception is shown.

Minimal example

from bokeh.io import export_svgs, export_png
from bokeh.models import Plot, Arrow, VeeHead, Range1d

plot = Plot( output_backend='svg',y_range=Range1d(-1,2),x_range=Range1d(-1,2))

plot.add_layout(Arrow(end=VeeHead(),
                      x_start=0, y_start=0,
                      x_end=1,   y_end=1))

plot.add_layout(Arrow(end=VeeHead(),
                      x_start=0, y_start=0,
                      x_end=0,   y_end=1))

export_png(plot,filename='svg_arrow.png')
export_svgs(plot,filename='arrow.svg')

Output with canvas backend.
canvas_arrow

Output with svg backend.
svg__arrow

Version Info
python: 3.6.8
bokeh: 1.0.4
selenium: 3.141.0
phantomjs: 2.1.1

@mattpap
Copy link
Contributor

mattpap commented Mar 15, 2019

Errors in JS console (this is why idle doesn't trigger):

canvas2svg.js:536 Attempted to apply path command to node g
canvas2svg.js:953 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

Possibly a duplicate of other SVG backend related issues, but this is the first time I see this DOMException.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants