DistanceMeasurement#

class jdaviz.core.marks.DistanceMeasurement(viewer, x=[], y=[], text='')[source]#

Bases: object

A composite mark that displays a line between two points with a dynamically rotated and offset label showing the distance.

This class manages a collection of bqplot marks (a Line and two Labels for text and its halo) to create a single, cohesive measurement indicator in a viewer. The core logic in the update_points method handles the positioning, rotation, and offsetting of the label to ensure it remains parallel to the line while avoiding intersection.

Attributes Summary

Methods Summary

update_points(x0, y0, x1, y1[, text])

Attributes Documentation

marks#
visible#

Methods Documentation

update_points(x0, y0, x1, y1, text='')[source]#