Scaling square boxes

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?

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.

1 Like

Wonderful, thanks!

I had tried Quad at early stages, and it didn’t work because I had the transformation wrong, and then forgot about it :roll_eyes:

:+1: :+1: :+1: :+1: