☰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

Scaling square boxes

Community Support
Guille
Guille

Hi there,

I am using this fantastic tool for overlaying results on maps. But I was wondering if the size of the squared boxes can be set in ‘coordinates’ rather than in a fixed value, in order to allow them scaling when zooming in or out.

I am successfully scaling from longitude and latitude and plotting it using:
p.square(x=“lon”, y=“lat”, size=20, fill_color=mapper, fill_alpha=0.6, source=source)

[image at right scale missing as I can only upload one, but trust me it works!] :slight_smile:
but when zooming in, they keep their size fixed and looks like:

Is there any way to allow those boxes to re-scale themselves?

⌁   Link to post
Bryan
Bryan

square is a scatter marker, so only support a size in pixels. If you need something the can scale with range changes you will need to use rect or quad or one of the bar glyphs, which all accept data-space coordinates.

⌁   Link to post

End of archived discussion · Replies are disabled