Interesting that it plots the angle in screen units and not data units and I can’t seem to find a property to alter that in the docs. The actual devs may have a better answer than me, but I’d probably implement a CustomJSTransform workaround in the meantime. Do you need “infinite length”? (i.e. length=)
The Ray glyph processes the angle by making a rotation of the HTML canvas:
before drawing the line, so the angle will always ultimately reflect a rotation in pixel space, not data-space. This is yet another case where a mismatch between data-space aspect ratio and pixel-space aspect ratio leads to unavoidable results. In general, any glyph that supports any sort of “angle” or “rotation” is going to be sensitive to aspect ratios in this way.
The simplest solution would be to set match_aspect=True on the plot. If that’s not feasible for some reason, you will have to look at other solutions besides Ray. e.g. manually drawing a “very long” line to simulate infinite length, or using a CustomJSTransform as @gmerritt123 suggests.