fastplotlib.Cursor#

class Cursor(mode='crosshair', size=1.0, color='w', marker='+', edge_color='k', edge_width=0.5, alpha=0.7, size_space='screen')[source]#

A cursor that indicates the same position in world-space across subplots.

Parameters:
  • mode ("crosshair" | "marker") – cursor mode

  • size (float, default 1.0) –

    • if mode == ‘crosshair’, this is the crosshair line thickness

    • if mode == ‘marker’, it’s the size of the marker

    You probably want to use size > 5 if mode is ‘marker’ and size_space is screen

  • color (str | Sequence[float] | pygfx.Color | np.ndarray, default "r") – color of the marker

  • marker (str, default "+") – marker shape, used if mode == ‘marker’

  • edge_color (str | Sequence[float] | pygfx.Color | np.ndarray, default "k") – marker edge color, used if mode == ‘marker’

  • edge_width (float, default 0.5) – marker edge widget, used if mode == ‘marker’

  • alpha (float, default 0.7) – alpha (transparency) of the cursor

  • size_space ("screen" | "world", default "screen") – size space of the cursor, if “screen” the size is exact screen pixels. if “world” the size is in world-space

Examples#

Cursor transform

Cursor transform

Cursor tool

Cursor tool

Cursor tool, marker mode

Cursor tool, marker mode