☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Getting anchor argument of image_url() to work

Community Support
comperem
comperem

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)
⌁   Link to post
comperem
comperem

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.

⌁   Link to post

End of archived discussion · Replies are disabled