Skip to content

Commit 1e61b64

Browse files
committed
merge conflict
2 parents ac76f6a + 09db45d commit 1e61b64

File tree

129 files changed

+1681
-668
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+1681
-668
lines changed

docs/source/api/graphics/Graphic.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.. _api.Graphic:
2+
3+
Graphic
4+
*******
5+
6+
=======
7+
Graphic
8+
=======
9+
.. currentmodule:: fastplotlib
10+
11+
Constructor
12+
~~~~~~~~~~~
13+
.. autosummary::
14+
:toctree: Graphic_api
15+
16+
Graphic
17+
18+
Properties
19+
~~~~~~~~~~
20+
.. autosummary::
21+
:toctree: Graphic_api
22+
23+
Graphic.axes
24+
Graphic.block_events
25+
Graphic.deleted
26+
Graphic.event_handlers
27+
Graphic.name
28+
Graphic.offset
29+
Graphic.right_click_menu
30+
Graphic.rotation
31+
Graphic.supported_events
32+
Graphic.visible
33+
Graphic.world_object
34+
35+
Methods
36+
~~~~~~~
37+
.. autosummary::
38+
:toctree: Graphic_api
39+
40+
Graphic.add_axes
41+
Graphic.add_event_handler
42+
Graphic.clear_event_handlers
43+
Graphic.remove_event_handler
44+
Graphic.rotate
45+

docs/source/api/graphics/ImageGraphic.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,4 @@ Methods
5252
ImageGraphic.remove_event_handler
5353
ImageGraphic.reset_vmin_vmax
5454
ImageGraphic.rotate
55-
ImageGraphic.share_property
56-
ImageGraphic.unshare_property
5755

docs/source/api/graphics/LineCollection.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,4 @@ Methods
5757
LineCollection.remove_event_handler
5858
LineCollection.remove_graphic
5959
LineCollection.rotate
60-
LineCollection.share_property
61-
LineCollection.unshare_property
6260

docs/source/api/graphics/LineGraphic.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,4 @@ Methods
5050
LineGraphic.clear_event_handlers
5151
LineGraphic.remove_event_handler
5252
LineGraphic.rotate
53-
LineGraphic.share_property
54-
LineGraphic.unshare_property
5553

docs/source/api/graphics/LineStack.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,4 @@ Methods
5757
LineStack.remove_event_handler
5858
LineStack.remove_graphic
5959
LineStack.rotate
60-
LineStack.share_property
61-
LineStack.unshare_property
6260

docs/source/api/graphics/ScatterGraphic.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,4 @@ Methods
4747
ScatterGraphic.clear_event_handlers
4848
ScatterGraphic.remove_event_handler
4949
ScatterGraphic.rotate
50-
ScatterGraphic.share_property
51-
ScatterGraphic.unshare_property
5250

docs/source/api/graphics/TextGraphic.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,4 @@ Methods
4747
TextGraphic.clear_event_handlers
4848
TextGraphic.remove_event_handler
4949
TextGraphic.rotate
50-
TextGraphic.share_property
51-
TextGraphic.unshare_property
5250

docs/source/api/graphics/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Graphics
44
.. toctree::
55
:maxdepth: 1
66

7+
Graphic
78
LineGraphic
89
ScatterGraphic
910
ImageGraphic

docs/source/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ API Reference
99
graphics/index
1010
graphic_features/index
1111
selectors/index
12+
tools/index
1213
ui/index
1314
widgets/index
1415
fastplotlib

docs/source/api/layouts/figure.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Properties
2727
Figure.names
2828
Figure.renderer
2929
Figure.shape
30+
Figure.show_tooltips
31+
Figure.tooltip_manager
3032

3133
Methods
3234
~~~~~~~

docs/source/api/layouts/imgui_figure.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Properties
2929
ImguiFigure.names
3030
ImguiFigure.renderer
3131
ImguiFigure.shape
32+
ImguiFigure.show_tooltips
33+
ImguiFigure.tooltip_manager
3234

3335
Methods
3436
~~~~~~~

docs/source/api/selectors/LinearRegionSelector.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,4 @@ Methods
5252
LinearRegionSelector.get_selected_indices
5353
LinearRegionSelector.remove_event_handler
5454
LinearRegionSelector.rotate
55-
LinearRegionSelector.share_property
56-
LinearRegionSelector.unshare_property
5755

docs/source/api/selectors/LinearSelector.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,4 @@ Methods
5252
LinearSelector.get_selected_indices
5353
LinearSelector.remove_event_handler
5454
LinearSelector.rotate
55-
LinearSelector.share_property
56-
LinearSelector.unshare_property
5755

docs/source/api/selectors/RectangleSelector.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,4 @@ Methods
5252
RectangleSelector.get_selected_indices
5353
RectangleSelector.remove_event_handler
5454
RectangleSelector.rotate
55-
RectangleSelector.share_property
56-
RectangleSelector.unshare_property
5755

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.. _api.HistogramLUTTool:
2+
3+
HistogramLUTTool
4+
****************
5+
6+
================
7+
HistogramLUTTool
8+
================
9+
.. currentmodule:: fastplotlib
10+
11+
Constructor
12+
~~~~~~~~~~~
13+
.. autosummary::
14+
:toctree: HistogramLUTTool_api
15+
16+
HistogramLUTTool
17+
18+
Properties
19+
~~~~~~~~~~
20+
.. autosummary::
21+
:toctree: HistogramLUTTool_api
22+
23+
HistogramLUTTool.axes
24+
HistogramLUTTool.block_events
25+
HistogramLUTTool.cmap
26+
HistogramLUTTool.deleted
27+
HistogramLUTTool.event_handlers
28+
HistogramLUTTool.image_graphic
29+
HistogramLUTTool.name
30+
HistogramLUTTool.offset
31+
HistogramLUTTool.right_click_menu
32+
HistogramLUTTool.rotation
33+
HistogramLUTTool.supported_events
34+
HistogramLUTTool.visible
35+
HistogramLUTTool.vmax
36+
HistogramLUTTool.vmin
37+
HistogramLUTTool.world_object
38+
39+
Methods
40+
~~~~~~~
41+
.. autosummary::
42+
:toctree: HistogramLUTTool_api
43+
44+
HistogramLUTTool.add_axes
45+
HistogramLUTTool.add_event_handler
46+
HistogramLUTTool.clear_event_handlers
47+
HistogramLUTTool.disconnect_image_graphic
48+
HistogramLUTTool.remove_event_handler
49+
HistogramLUTTool.rotate
50+
HistogramLUTTool.set_data
51+

docs/source/api/tools/Tooltip.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.. _api.Tooltip:
2+
3+
Tooltip
4+
*******
5+
6+
=======
7+
Tooltip
8+
=======
9+
.. currentmodule:: fastplotlib
10+
11+
Constructor
12+
~~~~~~~~~~~
13+
.. autosummary::
14+
:toctree: Tooltip_api
15+
16+
Tooltip
17+
18+
Properties
19+
~~~~~~~~~~
20+
.. autosummary::
21+
:toctree: Tooltip_api
22+
23+
Tooltip.background_color
24+
Tooltip.font_size
25+
Tooltip.outline_color
26+
Tooltip.padding
27+
Tooltip.text_color
28+
Tooltip.world_object
29+
30+
Methods
31+
~~~~~~~
32+
.. autosummary::
33+
:toctree: Tooltip_api
34+
35+
Tooltip.register
36+
Tooltip.unregister
37+
Tooltip.unregister_all
38+

docs/source/api/tools/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Tools
2+
*****
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
HistogramLUTTool
8+
Tooltip

docs/source/conf.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949

5050
sphinx_gallery_conf = {
5151
"gallery_dirs": "_gallery",
52+
"notebook_extensions": {}, # remove the download notebook button
5253
"backreferences_dir": "_gallery/backreferences",
5354
"doc_module": ("fastplotlib",),
5455
"image_scrapers": ("pygfx",),
@@ -106,7 +107,14 @@
106107
"switcher": {
107108
"json_url": "http://www.fastplotlib.org/_static/switcher.json",
108109
"version_match": release
109-
}
110+
},
111+
"icon_links": [
112+
{
113+
"name": "Github",
114+
"url": "https://github.com/fastplotlib/fastplotlib",
115+
"icon": "fa-brands fa-github",
116+
}
117+
]
110118
}
111119

112120
html_static_path = ["_static"]

docs/source/developer_notes/layouts.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Layouts
44
PlotArea
55
--------
66

7-
This is the main base class within layouts. A ``Figure`` and ``Dock`` are areas within a ``Subplot`` that
8-
inherit from ``PlotArea``.
7+
This is the main base class within layouts. A ``Subplot`` and ``Dock`` are areas within a ``Figure``.
8+
``Subplot`` and ``Dock`` inherit from ``PlotArea``.
99

1010
``PlotArea`` has the following key properties that allow it to be a "plot area" that can be used to view graphical objects:
1111

@@ -81,4 +81,4 @@ Now that we have understood ``PlotArea`` and ``Subplot`` we need a way for the u
8181

8282
A ``Figure`` contains a grid of subplot and has methods such as ``show()`` to output the figure.
8383
``Figure.__init__`` basically does a lot of parsing of user arguments to determine how to create
84-
the subplots. All subplots within a ``Figure`` share the same canvas and use different viewports to create the subplots.
84+
the subplots. All subplots within a ``Figure`` share the same canvas and use different viewports to create the subplots.

docs/source/generate_api.py

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from fastplotlib.layouts import Subplot
1010
from fastplotlib import graphics
1111
from fastplotlib.graphics import features, selectors
12+
from fastplotlib import tools
1213
from fastplotlib import widgets
1314
from fastplotlib import utils
1415
from fastplotlib import ui
@@ -21,6 +22,7 @@
2122
GRAPHICS_DIR = API_DIR.joinpath("graphics")
2223
GRAPHIC_FEATURES_DIR = API_DIR.joinpath("graphic_features")
2324
SELECTORS_DIR = API_DIR.joinpath("selectors")
25+
TOOLS_DIR = API_DIR.joinpath("tools")
2426
WIDGETS_DIR = API_DIR.joinpath("widgets")
2527
UI_DIR = API_DIR.joinpath("ui")
2628
GUIDE_DIR = current_dir.joinpath("user_guide")
@@ -31,6 +33,7 @@
3133
GRAPHICS_DIR,
3234
GRAPHIC_FEATURES_DIR,
3335
SELECTORS_DIR,
36+
TOOLS_DIR,
3437
WIDGETS_DIR,
3538
UI_DIR,
3639
]
@@ -264,7 +267,8 @@ def main():
264267
)
265268

266269
# the rest of this is a mess and can be refactored later
267-
270+
##############################################################################
271+
# ** Graphic classes ** #
268272
graphic_classes = [getattr(graphics, g) for g in graphics.__all__]
269273

270274
graphic_class_names = [g.__name__ for g in graphic_classes]
@@ -290,7 +294,7 @@ def main():
290294
source_path=GRAPHICS_DIR.joinpath(f"{graphic_cls.__name__}.rst"),
291295
)
292296
##############################################################################
293-
297+
# ** GraphicFeature classes ** #
294298
feature_classes = [getattr(features, f) for f in features.__all__]
295299

296300
feature_class_names = [f.__name__ for f in feature_classes]
@@ -315,7 +319,7 @@ def main():
315319
source_path=GRAPHIC_FEATURES_DIR.joinpath(f"{feature_cls.__name__}.rst"),
316320
)
317321
##############################################################################
318-
322+
# ** Selector classes ** #
319323
selector_classes = [getattr(selectors, s) for s in selectors.__all__]
320324

321325
selector_class_names = [s.__name__ for s in selector_classes]
@@ -339,8 +343,35 @@ def main():
339343
modules=["fastplotlib"],
340344
source_path=SELECTORS_DIR.joinpath(f"{selector_cls.__name__}.rst"),
341345
)
346+
342347
##############################################################################
348+
# ** Tools classes ** #
349+
tools_classes = [getattr(tools, t) for t in tools.__all__]
343350

351+
tools_class_names = [t.__name__ for t in tools_classes]
352+
353+
tools_class_names_str = "\n ".join([""] + tools_class_names)
354+
355+
with open(TOOLS_DIR.joinpath("index.rst"), "w") as f:
356+
f.write(
357+
f"Tools\n"
358+
f"*****\n"
359+
f"\n"
360+
f".. toctree::\n"
361+
f" :maxdepth: 1\n"
362+
f"{tools_class_names_str}\n"
363+
)
364+
365+
for tool_cls in tools_classes:
366+
generate_page(
367+
page_name=tool_cls.__name__,
368+
classes=[tool_cls],
369+
modules=["fastplotlib"],
370+
source_path=TOOLS_DIR.joinpath(f"{tool_cls.__name__}.rst"),
371+
)
372+
373+
##############################################################################
374+
# ** Widget classes ** #
344375
widget_classes = [getattr(widgets, w) for w in widgets.__all__]
345376

346377
widget_class_names = [w.__name__ for w in widget_classes]
@@ -365,7 +396,7 @@ def main():
365396
source_path=WIDGETS_DIR.joinpath(f"{widget_cls.__name__}.rst"),
366397
)
367398
##############################################################################
368-
399+
# ** UI classes ** #
369400
ui_classes = [ui.BaseGUI, ui.Window, ui.EdgeWindow, ui.Popup]
370401

371402
ui_class_names = [cls.__name__ for cls in ui_classes]
@@ -410,6 +441,7 @@ def main():
410441
" graphics/index\n"
411442
" graphic_features/index\n"
412443
" selectors/index\n"
444+
" tools/index\n"
413445
" ui/index\n"
414446
" widgets/index\n"
415447
" fastplotlib\n"
@@ -438,6 +470,9 @@ def write_table(name, feature_cls):
438470
f.write("============\n\n")
439471

440472
for graphic_cls in [*graphic_classes, *selector_classes]:
473+
if graphic_cls is graphics.Graphic:
474+
# skip Graphic base class
475+
continue
441476
f.write(f"{graphic_cls.__name__}\n")
442477
f.write("-" * len(graphic_cls.__name__) + "\n\n")
443478
for name, type_ in graphic_cls._features.items():

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy