☰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

Rectangles with center in data units, width/height in screen units

Community Support
jmargolpeople
jmargolpeople

Hey all,

I’m trying to render a rectangle where I place its center in data units but then can choose its height and width in screen units.

As far as I can tell, this is similar to but different from:

  • scatter ing squares, as I can’t control the height and width separately
  • rect, as though this takes positions in data units and can take width/heights in screen units, the position always demarcates the top/bottom left and I need it to demarcate the center. If I could make the position a combination of a data unit position plus a screen unit offset, this would work, but I don’t see that option.
  • quad which seems to only be measured in data units
  • patch which seems to only be measured in data units

Is what I want possible?

⌁   Link to post

End of archived discussion · Replies are disabled