ruler#
- brainrender.actors.ruler(p1, p2, unit_scale=1, units=None, s=50)[source]#
Create a ruler showing the distance between two points. The ruler is composed of a line between the points and a text indicating the distance.
- Parameters:
p1 (
TypeAliasType) – Coordinates of the first point.p2 (
TypeAliasType) – Coordinates of the second point.unit_scale (
float) – Scale factor for the displayed units (e.g. 0.001 to show mm instead of µm).units (
str|None) – Unit label string (e.g."mm").s (
float) – Text size. Default 50.
- Returns:
A ruler actor showing the distance between the two points.
- Return type: