-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
SVG backend doesn't respect NaN/non-finite values #10305
Comments
@mosc9575 It would be a helpful experiment if you can vary the data size and see if there is any particular threshold for the problem to start showing up. My speculation is that SVG output does not actually modify any input data [1], but that the third-party [1] Though if you can demonstrate the input data structures are actually changed before/after an svg export, please do |
@bryevdv I was working on this problem a bit and today I was successful to build a real minimal example. I figured out that the problem is conected to NaN-values in the data.
Screenshots |
Output in JS console:
|
The problem is that our SVG backend, that imitates canvas 2d rendering context, doesn't implement corner cases properly. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
software version info (bokeh, python)
Python: 3.6.10
Bokeh: 2.1.1
Description of the observed behavior
The export_svg() function creates an image where some data is missing. If the figure is shown before and after the export function the changes become obvious.
Minimal example
example_data.zip
Screenshots
This is the output if the code runs in a jupyter notebook.
First the figure is shown right before any export.

Now the figure is exported to an image in png format. This works fine, nothing to complain about.

Now the figure is exported to an image in svg format. The stored svg file contains the figure below.

Comment
I was trying to creat a simplier minimal example, but I was not successful.
I was able to reproduce this problem with different data sets, similar to the given one. As far as I know this problem only occurs with a datetime index.
The text was updated successfully, but these errors were encountered: