Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
97442f5
new cursor tool, basics work
kushalkolar Nov 19, 2025
034f719
lint and update api docs
clewis7 Nov 19, 2025
9a18381
add custom tooltip to figure
kushalkolar Nov 20, 2025
b08e744
Merge branch 'cursor-simpler' of https://github.com/fastplotlib/fastp…
kushalkolar Nov 20, 2025
cf0c6dd
example WIP
kushalkolar Nov 20, 2025
86807c2
manual picking, world obj -> graphic mapping
kushalkolar Nov 20, 2025
506fa2c
fix
kushalkolar Nov 20, 2025
f69ccc9
fix gc
kushalkolar Nov 20, 2025
c0c1203
stuff
kushalkolar Nov 25, 2025
cbc5127
Merge branch 'main' into cursor-simpler
kushalkolar Dec 6, 2025
5630f23
Merge branch 'cursor-simpler' of https://github.com/fastplotlib/fastp…
kushalkolar Dec 6, 2025
c5f8eac
cursor and tooltips refactor, basically works
kushalkolar Dec 6, 2025
9323e3a
much simpler tooltip and cursor
kushalkolar Dec 7, 2025
a59f686
move TextBox and Tooltip, update API docs
kushalkolar Dec 7, 2025
c60f1fe
cursor manages tooltips
kushalkolar Dec 7, 2025
32493b1
update examples
kushalkolar Dec 7, 2025
ed297f5
black
kushalkolar Dec 7, 2025
40f3357
cleanup
kushalkolar Dec 7, 2025
a3252eb
docstrings
kushalkolar Dec 7, 2025
c6133cd
update example
kushalkolar Dec 7, 2025
75d13fe
update example
kushalkolar Dec 7, 2025
6d535e7
add image space transforms examples
kushalkolar Dec 17, 2025
00b51a9
finish space transforms examples
kushalkolar Dec 17, 2025
1cafa74
typing
kushalkolar Dec 17, 2025
f585007
black
kushalkolar Dec 17, 2025
a64ce67
docstrings
kushalkolar Dec 17, 2025
a0f74c2
update examples
kushalkolar Dec 17, 2025
6a648e7
textbox constructor takes args, docstrings
kushalkolar Dec 17, 2025
dd65092
True -> true
kushalkolar Dec 17, 2025
cd0f216
update names
kushalkolar Dec 17, 2025
70c8088
update cursor examples
kushalkolar Dec 17, 2025
d4c3eb7
new ground truth screenshots for transforms
kushalkolar Dec 17, 2025
edca694
black
kushalkolar Dec 17, 2025
3570fba
update
kushalkolar Dec 17, 2025
a7bf44c
revert persist kwarg in PlotArea animations stuff
kushalkolar Dec 17, 2025
fba5247
fix
kushalkolar Dec 22, 2025
201b75c
message for image volumes
kushalkolar Dec 22, 2025
32c7d5f
Update fastplotlib/graphics/_base.py
clewis7 Jan 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions docs/source/api/tools/Cursor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.. _api.Cursor:

Cursor
******

======
Cursor
======
.. currentmodule:: fastplotlib

Constructor
~~~~~~~~~~~
.. autosummary::
:toctree: Cursor_api

Cursor

Properties
~~~~~~~~~~
.. autosummary::
:toctree: Cursor_api

Cursor.alpha
Cursor.color
Cursor.edge_color
Cursor.edge_width
Cursor.marker
Cursor.mode
Cursor.pause
Cursor.position
Cursor.size
Cursor.size_space

Methods
~~~~~~~
.. autosummary::
:toctree: Cursor_api

Cursor.add_subplot
Cursor.clear
Cursor.remove_subplot

40 changes: 40 additions & 0 deletions docs/source/api/tools/GraphicTooltip.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.. _api.GraphicTooltip:

GraphicTooltip
**************

==============
GraphicTooltip
==============
.. currentmodule:: fastplotlib

Constructor
~~~~~~~~~~~
.. autosummary::
:toctree: GraphicTooltip_api

GraphicTooltip

Properties
~~~~~~~~~~
.. autosummary::
:toctree: GraphicTooltip_api

GraphicTooltip.background_color
GraphicTooltip.font_size
GraphicTooltip.outline_color
GraphicTooltip.padding
GraphicTooltip.text_color
GraphicTooltip.world_object

Methods
~~~~~~~
.. autosummary::
:toctree: GraphicTooltip_api

GraphicTooltip.clear
GraphicTooltip.display
GraphicTooltip.register
GraphicTooltip.unregister
GraphicTooltip.unregister_all

5 changes: 2 additions & 3 deletions docs/source/api/tools/Tooltip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Methods
.. autosummary::
:toctree: Tooltip_api

Tooltip.register
Tooltip.unregister
Tooltip.unregister_all
Tooltip.clear
Tooltip.display

2 changes: 2 additions & 0 deletions docs/source/api/tools/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ Tools

HistogramLUTTool
Tooltip
GraphicTooltip
Cursor
33 changes: 33 additions & 0 deletions examples/misc/cursors.py
Comment thread
kushalkolar marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""
Cursor tool
===========

Example with multiple subplots and an interactive cursor
that marks the same position in each subplot
"""

import numpy as np
import fastplotlib as fpl
import imageio.v3 as iio

img1 = iio.imread("imageio:camera.png")
img2 = iio.imread("imageio:astronaut.png")

scatter_data = np.random.normal(loc=256, scale=(50), size=(500)).reshape(250, 2)


figure = fpl.Figure(shape=(2, 2))

figure[0, 0].add_image(img1)
figure[0, 1].add_image(img2)
figure[1, 0].add_scatter(scatter_data, sizes=5)

cursor = fpl.Cursor(mode="crosshair", color="cyan")

for subplot in figure:
cursor.add_subplot(subplot)

figure.show_tooltips = True

figure.show()
fpl.loop.run()
6 changes: 3 additions & 3 deletions fastplotlib/layouts/_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ._subplot import Subplot
from ._engine import GridLayout, WindowLayout, ScreenSpaceCamera
from .. import ImageGraphic
from ..tools import Tooltip
from ..tools import GraphicTooltip


class Figure:
Expand Down Expand Up @@ -461,7 +461,7 @@ def __init__(
self._overlay_scene = pygfx.Scene()

# tooltip in overlay render pass
self._tooltip_manager = Tooltip()
self._tooltip_manager = GraphicTooltip()
self._overlay_scene.add(self._tooltip_manager.world_object)

self._show_tooltips = show_tooltips
Expand Down Expand Up @@ -534,7 +534,7 @@ def names(self) -> np.ndarray[str]:
return names

@property
def tooltip_manager(self) -> Tooltip:
def tooltip_manager(self) -> GraphicTooltip:
"""manage tooltips"""
return self._tooltip_manager

Expand Down
5 changes: 4 additions & 1 deletion fastplotlib/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from ._histogram_lut import HistogramLUTTool
from ._tooltip import Tooltip
from ._tooltip import Tooltip, GraphicTooltip
from ._cursor import Cursor

__all__ = [
"HistogramLUTTool",
"Tooltip",
"GraphicTooltip",
"Cursor",
]
Loading