Getting anchor argument of image_url() to work

Hello,

I can’t seem to get the anchor argument to work with image_url(), specifically in combination with the angle argument. This script should rotate the image around the center (anchor) but it still seems to rotate around the upper left corner of the image.

Is there something I’m missing or is anchor not working?

from bokeh.plotting import figure, show, output_file
output_file("foo.html")

p = figure(x_range=(-500,500), y_range=(-500,500))

img="https://static.bokeh.org/logos/logo.png"
p.image_url( url=[ img ],
         x=0, y=0, w=400, h=400, anchor="center", angle=0.5)

show(p)
1 Like

@comperem It appears that anchor and angle work independently but have a bug when combined. Please file a Github issue with all of the above information.

Ok, got it.

It seems that a rotation by angle first, followed by position placement to x and y immediately following should provide the proper result.

I’ll try this and also send in an issue.

3 Likes