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

[BUG] SVG backend mirrors image in plot #10725

Closed
juhasch opened this issue Nov 24, 2020 · 0 comments · Fixed by #10726
Closed

[BUG] SVG backend mirrors image in plot #10725

juhasch opened this issue Nov 24, 2020 · 0 comments · Fixed by #10726

Comments

@juhasch
Copy link

juhasch commented Nov 24, 2020

I want to export a Bokeh plot as SVG. Following https://docs.bokeh.org/en/latest/docs/user_guide/export.html, I add
plot.output_backend = "svg". This causes the image in the plot to be mirrored and shifted outside of the bounding box.

  • System: Linux Mint 20 Cinnamon, Firefox browser
  • Anaconda installation with:
    • bokeh 2.2.3 py_0 bokeh
    • python 3.8.5 h1103e12_9_cpython conda-forge

This also happens with Windows + Anaconda + Edge browser

Example

Taken from the Bokeh gallery:

import numpy as np

from bokeh.plotting import figure, show
from bokeh.io import output_notebook
output_notebook()

N = 500
x = np.linspace(0, 10, N)
y = np.linspace(0, 10, N)
xx, yy = np.meshgrid(x, y)
d = np.sin(xx)*np.cos(yy)

p = figure(tooltips=[("x", "$x"), ("y", "$y"), ("value", "@image")])
p.x_range.range_padding = p.y_range.range_padding = 0

# must give a vector of image data for image parameter
p.image(image=[d], x=0, y=0, dw=10, dh=10, palette="Spectral11", level="image")
p.grid.grid_line_width = 0.5

p.output_backend = "svg"  # SVG output
show(p)

grafik

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.

2 participants