napari-plot 0.3.1__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.github/workflows/test_and_deploy.yml +1 -0
- napari_plot-0.4.1/CHANGELOG.md +40 -0
- {napari_plot-0.3.1/napari_plot.egg-info → napari_plot-0.4.1}/PKG-INFO +22 -4
- {napari_plot-0.3.1 → napari_plot-0.4.1}/README.md +17 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/__init__.py +4 -4
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/actions/_layerlist_context_actions.py +3 -3
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/_qapp_model/_qproviders.py +3 -22
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/component_controls/qt_legend_controls.py +22 -14
- napari_plot-0.4.1/napari_plot/_qt/layer_controls/qt_interval_controls.py +85 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_layer_controls_base.py +2 -2
- napari_plot-0.4.1/napari_plot/_qt/layer_controls/qt_layer_controls_container.py +146 -0
- napari_plot-0.4.1/napari_plot/_qt/layer_controls/qt_rectangles_controls.py +149 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_scatter_controls.py +6 -2
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_text_controls.py +9 -1
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/qt_event_loop.py +4 -14
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/qt_layer_buttons.py +6 -0
- napari_plot-0.4.1/napari_plot/_qt/qt_layer_list.py +45 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/qt_main_window.py +16 -4
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/qt_viewer.py +3 -5
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/qt_welcome.py +1 -2
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_version.py +3 -3
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/canvas.py +55 -57
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/components/camera.py +16 -3
- napari_plot-0.4.1/napari_plot/_vispy/layers/band.py +44 -0
- napari_plot-0.4.1/napari_plot/_vispy/layers/error_bar.py +146 -0
- napari_plot-0.4.1/napari_plot/_vispy/layers/rectangles.py +129 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/layers/scatter.py +7 -4
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/layers/text.py +7 -1
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/overlays/legend.py +16 -8
- napari_plot-0.4.1/napari_plot/_vispy/overlays/text.py +88 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/utils/visual.py +19 -1
- napari_plot-0.4.1/napari_plot/_vispy/visuals/rectangles.py +126 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/_viewer_key_bindings.py +12 -7
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/_viewer_mouse_bindings.py +70 -80
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/layerlist.py +4 -5
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/legend.py +17 -4
- napari_plot-0.4.1/napari_plot/components/scene.py +12 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/viewer_model.py +117 -10
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/__init__.py +9 -1
- napari_plot-0.4.1/napari_plot/layers/band.py +156 -0
- napari_plot-0.4.1/napari_plot/layers/error_bar.py +172 -0
- napari_plot-0.4.1/napari_plot/layers/rectangles/__init__.py +5 -0
- napari_plot-0.4.1/napari_plot/layers/rectangles/rectangles.py +406 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/scatter/scatter.py +4 -3
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/text/text.py +14 -8
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/napari.yaml +4 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/qss/10_napari_plot.qss +1 -1
- {napari_plot-0.3.1 → napari_plot-0.4.1/napari_plot.egg-info}/PKG-INFO +22 -4
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot.egg-info/SOURCES.txt +22 -1
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot.egg-info/requires.txt +6 -4
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot.egg-info/scm_file_list.json +273 -248
- napari_plot-0.4.1/napari_plot.egg-info/scm_version.json +8 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/pyproject.toml +21 -18
- napari_plot-0.4.1/tests/_qt/test_interval_layers.py +111 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_qt/test_qt_layer_buttons.py +14 -1
- napari_plot-0.4.1/tests/_qt/test_qt_layer_control_sliders.py +74 -0
- napari_plot-0.4.1/tests/_qt/test_qt_layer_list.py +144 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_qt/test_qt_viewer.py +57 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_vispy/test_camera.py +24 -0
- napari_plot-0.4.1/tests/_vispy/test_vispy_rectangles_layer.py +71 -0
- napari_plot-0.4.1/tests/components/test_viewer_mouse_bindings.py +114 -0
- napari_plot-0.4.1/tests/layer_controls/test_qt_rectangles_controls.py +76 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/test_duplication.py +11 -1
- napari_plot-0.4.1/tests/layers/test_interval_layers.py +84 -0
- napari_plot-0.4.1/tests/layers/test_rectangles.py +94 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/test_registration.py +3 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/test_examples.py +0 -7
- napari_plot-0.4.1/tests/test_napari_010.py +265 -0
- napari_plot-0.3.1/napari_plot/_qt/layer_controls/qt_layer_controls_container.py +0 -59
- napari_plot-0.3.1/napari_plot/_vispy/overlays/text.py +0 -50
- napari_plot-0.3.1/napari_plot/utils/_register.py +0 -60
- napari_plot-0.3.1/napari_plot.egg-info/scm_version.json +0 -8
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.deepsource.toml +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.github/ISSUE_TEMPLATE/documentation.md +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.github/TEST_FAIL_TEMPLATE.md +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.github/dependabot.yml +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.github/workflows/auto_author_assign.yml +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.gitignore +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/.pre-commit-config.yaml +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/LICENSE +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/MANIFEST.in +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/Makefile +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/codecov.yml +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/conftest.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/__main__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/_app.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/actions/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/constants/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/constants/_menus.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/context/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/context/_context.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/context/_context_keys.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/context/_layerlist_context.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/utils.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_contribution.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_plot_widget.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/_qapp_model/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/component_controls/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/component_controls/qt_axis_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/component_controls/qt_camera_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_bar_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_centroids_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_infline_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_layers_dialog.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_line_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_multiline_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_region_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/qt_toolbar.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/widgets/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/widgets/qt_dev.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/widgets/qt_icon_button.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/widgets/qt_splash_screen.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_scatter_widget.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/camera.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/components/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/components/axis.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/layers/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/layers/bar.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/layers/centroids.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/layers/infline.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/layers/line.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/layers/multiline.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/layers/region.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/overlays/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/overlays/axis.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/overlays/grid_lines.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/tools/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/tools/drag.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/tools/polygon.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/utils/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/utils/axis.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/visuals/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/visuals/bar.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/visuals/centroids.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/visuals/infline.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/visuals/line.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/visuals/multiline.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/visuals/region.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_vispy/visuals/scatter.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/_viewer_utils.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/axis.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/camera.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/dragtool.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/grid_lines.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/gridlines.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/components/tools.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/bar/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/bar/bar.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/base.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/centroids/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/centroids/_centroids_constants.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/centroids/_centroids_key_bindings.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/centroids/_centroids_utils.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/centroids/centroids.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/infline/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/infline/_infline.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/infline/_infline_constants.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/infline/_infline_key_bindings.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/infline/_infline_list.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/infline/_infline_mouse_bindings.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/infline/_infline_utils.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/infline/infline.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/line/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/line/_line_constants.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/line/_line_key_bindings.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/line/line.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/multiline/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/multiline/_multiline_constants.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/multiline/_multiline_key_bindings.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/multiline/_multiline_list.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/multiline/_multiline_utils.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/multiline/multiline.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/region/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/region/_region.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/region/_region_constants.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/region/_region_key_bindings.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/region/_region_list.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/region/_region_mouse_bindings.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/region/_region_utils.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/region/region.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/scatter/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/scatter/_scatter_key_bindings.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/scatter/_utilities.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/text/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/utils/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/layers/utils/layer_utils.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/icon.icns +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/icon.ico +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/icons/logo_silhouette_plot.svg +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/icons/new_centroids.svg +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/icons/new_inf_line.svg +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/icons/new_line.svg +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/icons/new_region.svg +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/icons/new_scatter.svg +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/resources/logo.png +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/utils/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/utils/_test_support.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/utils/_tool.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/utils/action_manager.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/utils/system.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/utils/utilities.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/viewer.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/window.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot.egg-info/dependency_links.txt +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot.egg-info/entry_points.txt +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot.egg-info/not-zip-safe +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot.egg-info/top_level.txt +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/renovate.json +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/scripts/png_to_icon.bat +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/scripts/qtaicons.bat +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/setup.cfg +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_app_model/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_app_model/test_app.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_app_model/test_constants.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_app_model/test_context.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_app_model/test_layerlist_context.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_qt/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_qt/test_qt_axis_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_qt/test_qt_layer_control_icons.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_qt/test_qt_legend.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_qt/test_qt_splash_screen.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_qt/test_qt_window.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_vispy/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_vispy/test_axis.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_vispy/test_vispy_bar_layer.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_vispy/test_vispy_infline_layer.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_vispy/test_vispy_line_layer.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_vispy/test_vispy_region_layer.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_vispy/test_vispy_scatter_layer.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_vispy/test_vispy_text_layer.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/_vispy/test_vispy_tools.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/components/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/components/test_axis.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/components/test_camera.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/components/test_tools.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/components/test_viewer_model.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layer_controls/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layer_controls/test_qt_bar_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layer_controls/test_qt_infline_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layer_controls/test_qt_line_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layer_controls/test_qt_multiline_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layer_controls/test_qt_region_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layer_controls/test_qt_scatter_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layer_controls/test_qt_text_controls.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/centroids/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/centroids/test_centroids.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/infline/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/infline/test_infline.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/infline/test_infline_list.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/infline/test_infline_mouse_bindings.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/infline/test_infline_utils.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/line/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/line/test_line.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/multiline/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/multiline/test_multiline.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/multiline/test_multiline_list.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/multiline/test_multiline_utils.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/region/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/region/test_region.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/region/test_region_mouse_bindings.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/scatter/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/scatter/test_scatter.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/test_bar.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/text/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/layers/text/test_text.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/test_lazy_import.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/test_plot_widget.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/test_plotting_api.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/test_scatter_widget.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/utils/__init__.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/utils/test_tool.py +0 -0
- {napari_plot-0.3.1 → napari_plot-0.4.1}/tests/utils/test_utilities.py +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# napari-plot v0.3.1
|
|
2
|
+
|
|
3
|
+
Changes since `v0.2.0`.
|
|
4
|
+
|
|
5
|
+
## Added
|
|
6
|
+
|
|
7
|
+
- Added `Bar` layers with vertical and horizontal orientations.
|
|
8
|
+
- Supports positions, values, baseline, bar width, fill and border colors, border width, opacity, selection, and removal of selected bars.
|
|
9
|
+
- Added bar-layer controls and `vbar()` / `hbar()` convenience methods.
|
|
10
|
+
- Added `Text` layers with per-label text and colors, font styling, alignment, rotation, and offsets.
|
|
11
|
+
- Added interactive plot legends with automatic layer entries, custom entries, `Points`-property legends, synchronization, placement, and styling controls.
|
|
12
|
+
- Added logarithmic axes with positive-value validation and log tick generation.
|
|
13
|
+
- Added categorical axes with configurable ordered category labels.
|
|
14
|
+
- Added axis controls for linear, logarithmic, and categorical scales.
|
|
15
|
+
- Added the concise plotting API: `plot()`, `scatter()`, `imshow()`, `vbar()`, and `hbar()`.
|
|
16
|
+
- Added lazy imports for the top-level package.
|
|
17
|
+
- Added a complete Add Layer menu for supported napari-plot and napari layer types.
|
|
18
|
+
- Added extensive examples and API/usage documentation.
|
|
19
|
+
|
|
20
|
+
## Improvements and fixes
|
|
21
|
+
|
|
22
|
+
- Migrated to napari `0.8.0` and updated associated APIs, event handling, and Pydantic validation.
|
|
23
|
+
- Improved axis tick formatting, label-overlap handling, and custom tick formatter support.
|
|
24
|
+
- Improved region and infinite-line rendering using batched VisPy visuals.
|
|
25
|
+
- Improved region and infinite-line selection, opacity, visibility, extent calculation, and rendering updates.
|
|
26
|
+
- Improved camera drag and mouse-release handling.
|
|
27
|
+
- Improved layer duplication, registration, context menus, and layer controls.
|
|
28
|
+
- Improved embedded napari widgets with host-theme synchronization.
|
|
29
|
+
- Updated the scatter widget to use the currently displayed slices of selected image layers, support nD images, and report mismatched slice shapes clearly.
|
|
30
|
+
- Added broader test coverage for axes, legends, bars, text, rendering, controls, duplication, registration, and plotting helpers.
|
|
31
|
+
|
|
32
|
+
## Compatibility and packaging
|
|
33
|
+
|
|
34
|
+
- Python `3.11+` is now required.
|
|
35
|
+
- napari `0.8.0` is required.
|
|
36
|
+
- Qt6 is now the default configuration through PyQt6 or PySide6.
|
|
37
|
+
- Replaced the legacy tox-oriented development setup with uv dependency groups and workflows.
|
|
38
|
+
- Updated CI workflows, GitHub Actions versions, pre-commit configuration, and release/deployment automation.
|
|
39
|
+
- Renamed the top-level public model export from `ViewerModel1D` to `ViewerModel`.
|
|
40
|
+
- Updated CI and deployment workflow configuration.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: napari_plot
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Plugin providing support for 1d plotting in napari
|
|
5
5
|
Author-email: Lukasz Migas <lukas.migas@yahoo.com>
|
|
6
6
|
License: BSD 3-Clause
|
|
@@ -37,19 +37,20 @@ Requires-Dist: napari-plugin-engine>=0.2.0
|
|
|
37
37
|
Requires-Dist: numpy
|
|
38
38
|
Requires-Dist: qtpy
|
|
39
39
|
Requires-Dist: qtawesome>=1.2.0
|
|
40
|
-
Requires-Dist: napari==0.
|
|
40
|
+
Requires-Dist: napari==0.10.0
|
|
41
41
|
Requires-Dist: matplotlib
|
|
42
42
|
Requires-Dist: vispy
|
|
43
43
|
Requires-Dist: koyo
|
|
44
44
|
Requires-Dist: qtextra
|
|
45
45
|
Provides-Extra: pyside6
|
|
46
|
+
Requires-Dist: napari[pyside6]==0.10.0; extra == "pyside6"
|
|
47
|
+
Requires-Dist: pyside6!=6.12.0; python_version < "3.12" and extra == "pyside6"
|
|
46
48
|
Requires-Dist: pyside6>6.9.0; platform_system == "Windows" and extra == "pyside6"
|
|
47
49
|
Requires-Dist: pyside6; platform_system != "Windows" and extra == "pyside6"
|
|
48
50
|
Provides-Extra: pyside
|
|
49
51
|
Requires-Dist: napari_plot[pyside6]; extra == "pyside"
|
|
50
|
-
Provides-Extra: pyqt5
|
|
51
|
-
Requires-Dist: PyQt5!=5.15.0,>=5.13.2; extra == "pyqt5"
|
|
52
52
|
Provides-Extra: pyqt6
|
|
53
|
+
Requires-Dist: napari[pyqt6]==0.10.0; extra == "pyqt6"
|
|
53
54
|
Requires-Dist: pyqt6>=6.9.0; extra == "pyqt6"
|
|
54
55
|
Requires-Dist: pyqt6!=6.6.1; platform_system == "Darwin" and extra == "pyqt6"
|
|
55
56
|
Provides-Extra: pyqt
|
|
@@ -194,6 +195,10 @@ https://napari.org/docs/plugins/index.html
|
|
|
194
195
|
|
|
195
196
|
## Installation
|
|
196
197
|
|
|
198
|
+
napari-plot requires napari 0.10.0 and Python 3.11 or later. Use a Qt6 backend
|
|
199
|
+
with `pip install "napari-plot[pyqt6]"` or `pip install "napari-plot[pyside6]"`.
|
|
200
|
+
Qt5 is no longer supported.
|
|
201
|
+
|
|
197
202
|
You can install `napari-plot` directly from PyPI via:
|
|
198
203
|
|
|
199
204
|
```shell
|
|
@@ -208,6 +213,19 @@ cd napari-plot
|
|
|
208
213
|
pip install -e '.[all]'
|
|
209
214
|
```
|
|
210
215
|
|
|
216
|
+
The plot widgets open in a tabified bottom dock in napari. Custom layers retain
|
|
217
|
+
their individual controls; selecting several layers exposes shared opacity and
|
|
218
|
+
blending controls. Built-in-only selections use napari's dynamic controls.
|
|
219
|
+
|
|
220
|
+
`viewer.scene.camera` and `viewer.canvas.overlays` expose the new model layout.
|
|
221
|
+
Existing `viewer.camera`, `viewer.text_overlay`, `viewer.legend`, and
|
|
222
|
+
`viewer.grid_lines` accessors refer to the same objects. The custom camera,
|
|
223
|
+
log axes, and plot grid remain available.
|
|
224
|
+
|
|
225
|
+
Layer axis labels automatically populate the plot labels until those labels
|
|
226
|
+
are edited explicitly. Unspecified text and legend font sizes follow the
|
|
227
|
+
application's appearance font size; pass a number to fix the size.
|
|
228
|
+
|
|
211
229
|
Python 3.11 or later is required. See the
|
|
212
230
|
[documentation](https://napari-plot.readthedocs.io/) for standalone and embedded
|
|
213
231
|
quick starts, layer examples, axis controls, interactions, and the public API.
|
|
@@ -81,6 +81,10 @@ https://napari.org/docs/plugins/index.html
|
|
|
81
81
|
|
|
82
82
|
## Installation
|
|
83
83
|
|
|
84
|
+
napari-plot requires napari 0.10.0 and Python 3.11 or later. Use a Qt6 backend
|
|
85
|
+
with `pip install "napari-plot[pyqt6]"` or `pip install "napari-plot[pyside6]"`.
|
|
86
|
+
Qt5 is no longer supported.
|
|
87
|
+
|
|
84
88
|
You can install `napari-plot` directly from PyPI via:
|
|
85
89
|
|
|
86
90
|
```shell
|
|
@@ -95,6 +99,19 @@ cd napari-plot
|
|
|
95
99
|
pip install -e '.[all]'
|
|
96
100
|
```
|
|
97
101
|
|
|
102
|
+
The plot widgets open in a tabified bottom dock in napari. Custom layers retain
|
|
103
|
+
their individual controls; selecting several layers exposes shared opacity and
|
|
104
|
+
blending controls. Built-in-only selections use napari's dynamic controls.
|
|
105
|
+
|
|
106
|
+
`viewer.scene.camera` and `viewer.canvas.overlays` expose the new model layout.
|
|
107
|
+
Existing `viewer.camera`, `viewer.text_overlay`, `viewer.legend`, and
|
|
108
|
+
`viewer.grid_lines` accessors refer to the same objects. The custom camera,
|
|
109
|
+
log axes, and plot grid remain available.
|
|
110
|
+
|
|
111
|
+
Layer axis labels automatically populate the plot labels until those labels
|
|
112
|
+
are edited explicitly. Unspecified text and legend font sizes follow the
|
|
113
|
+
application's appearance font size; pass a number to fix the size.
|
|
114
|
+
|
|
98
115
|
Python 3.11 or later is required. See the
|
|
99
116
|
[documentation](https://napari-plot.readthedocs.io/) for standalone and embedded
|
|
100
117
|
quick starts, layer examples, axis controls, interactions, and the public API.
|
|
@@ -38,10 +38,10 @@ _LAZY_IMPORTS = {
|
|
|
38
38
|
|
|
39
39
|
def __getattr__(name: str) -> ty.Any:
|
|
40
40
|
"""Lazily import objects when accessed."""
|
|
41
|
-
# Need to import to ensure that `napari_plot` is included in the auto-class generator
|
|
42
|
-
from napari_plot.utils import _register # isort:skip noqa
|
|
43
|
-
|
|
44
|
-
del _register
|
|
41
|
+
# # Need to import to ensure that `napari_plot` is included in the auto-class generator
|
|
42
|
+
# from napari_plot.utils import _register # isort:skip noqa
|
|
43
|
+
#
|
|
44
|
+
# del _register
|
|
45
45
|
try:
|
|
46
46
|
module_name, attr_name = _LAZY_IMPORTS[name]
|
|
47
47
|
except KeyError:
|
{napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_app_model/actions/_layerlist_context_actions.py
RENAMED
|
@@ -41,7 +41,7 @@ LAYERLIST_CONTEXT_SUBMENUS = [
|
|
|
41
41
|
title="Projections",
|
|
42
42
|
group=MenuGroup.LAYERLIST_CONTEXT.SPLIT_MERGE,
|
|
43
43
|
order=None,
|
|
44
|
-
enablement=LLSCK.
|
|
44
|
+
enablement=((LLSCK.active_layer_type == "image") & (LLSCK.active_layer_ndim > 2)),
|
|
45
45
|
),
|
|
46
46
|
),
|
|
47
47
|
(
|
|
@@ -85,7 +85,7 @@ LAYERLIST_CONTEXT_ACTIONS: list[Action] = [
|
|
|
85
85
|
title="Split Stack",
|
|
86
86
|
callback=_layer_actions._split_stack,
|
|
87
87
|
menus=[{**LAYERCTX_SPLITMERGE, "when": ~LLSCK.active_layer_is_rgb}],
|
|
88
|
-
enablement=LLSCK.
|
|
88
|
+
enablement=((LLSCK.active_layer_type == "image") & (LLSCK.active_layer_ndim > 2)),
|
|
89
89
|
),
|
|
90
90
|
Action(
|
|
91
91
|
id="napari.layer.split_rgb",
|
|
@@ -238,7 +238,7 @@ for mode in ("max", "min", "std", "sum", "mean", "median"):
|
|
|
238
238
|
id=f"napari.layer.project_{mode}",
|
|
239
239
|
title=f"{mode} projection",
|
|
240
240
|
callback=partial(_layer_actions._project, mode=mode),
|
|
241
|
-
enablement=LLSCK.
|
|
241
|
+
enablement=((LLSCK.active_layer_type == "image") & (LLSCK.active_layer_ndim > 2)),
|
|
242
242
|
menus=[{"id": MenuId.LAYERS_CONTEXT_PROJECT}],
|
|
243
243
|
)
|
|
244
244
|
)
|
|
@@ -9,7 +9,6 @@ from typing import TYPE_CHECKING
|
|
|
9
9
|
|
|
10
10
|
from napari import components, layers
|
|
11
11
|
from napari.utils._proxies import PublicOnlyProxy
|
|
12
|
-
from napari.utils.translations import trans
|
|
13
12
|
|
|
14
13
|
if TYPE_CHECKING:
|
|
15
14
|
from napari._qt.qt_main_window import Window
|
|
@@ -33,13 +32,7 @@ def _provide_viewer_or_raise(msg: str = "", public_proxy: bool = False) -> Viewe
|
|
|
33
32
|
return viewer
|
|
34
33
|
if msg:
|
|
35
34
|
msg = " " + msg
|
|
36
|
-
raise RuntimeError(
|
|
37
|
-
trans._(
|
|
38
|
-
"No current `Viewer` found.{msg}",
|
|
39
|
-
deferred=True,
|
|
40
|
-
msg=msg,
|
|
41
|
-
)
|
|
42
|
-
)
|
|
35
|
+
raise RuntimeError(f"No current `Viewer` found.{msg}")
|
|
43
36
|
|
|
44
37
|
|
|
45
38
|
def _provide_qt_viewer() -> QtViewer:
|
|
@@ -58,13 +51,7 @@ def _provide_qt_viewer_or_raise(msg: str = "") -> QtViewer:
|
|
|
58
51
|
return qt_viewer
|
|
59
52
|
if msg:
|
|
60
53
|
msg = " " + msg
|
|
61
|
-
raise RuntimeError(
|
|
62
|
-
trans._(
|
|
63
|
-
"No current `QtViewer` found.{msg}",
|
|
64
|
-
deferred=True,
|
|
65
|
-
msg=msg,
|
|
66
|
-
)
|
|
67
|
-
)
|
|
54
|
+
raise RuntimeError(f"No current `QtViewer` found.{msg}")
|
|
68
55
|
|
|
69
56
|
|
|
70
57
|
def _provide_window() -> Window:
|
|
@@ -81,13 +68,7 @@ def _provide_window_or_raise(msg: str = "") -> Window:
|
|
|
81
68
|
return window
|
|
82
69
|
if msg:
|
|
83
70
|
msg = " " + msg
|
|
84
|
-
raise RuntimeError(
|
|
85
|
-
trans._(
|
|
86
|
-
"No current `Window` found.{msg}",
|
|
87
|
-
deferred=True,
|
|
88
|
-
msg=msg,
|
|
89
|
-
)
|
|
90
|
-
)
|
|
71
|
+
raise RuntimeError(f"No current `Window` found.{msg}")
|
|
91
72
|
|
|
92
73
|
|
|
93
74
|
def _provide_active_layer() -> layers.Layer:
|
{napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/component_controls/qt_legend_controls.py
RENAMED
|
@@ -9,6 +9,7 @@ import qtextra.helpers as hp
|
|
|
9
9
|
from napari._qt.utils import qt_signals_blocked
|
|
10
10
|
from napari._qt.widgets.qt_color_swatch import QColorSwatchEdit
|
|
11
11
|
from napari.components._viewer_constants import CanvasPosition
|
|
12
|
+
from napari.settings import get_settings
|
|
12
13
|
from napari.utils.events import disconnect_events
|
|
13
14
|
from qtextra.widgets.qt_dialog import QtFramelessPopup
|
|
14
15
|
from qtpy.QtCore import Qt
|
|
@@ -38,17 +39,22 @@ class QtLegendControls(QtFramelessPopup):
|
|
|
38
39
|
self.setMouseTracking(True)
|
|
39
40
|
|
|
40
41
|
overlay = viewer.legend
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
self._overlay_connections = (
|
|
43
|
+
(overlay.events.visible, self._on_visible_change),
|
|
44
|
+
(overlay.events.position, self._on_position_change),
|
|
45
|
+
(overlay.events.sync_with_source, self._on_auto_sync_change),
|
|
46
|
+
(overlay.events.text_color, self._on_text_color_change),
|
|
47
|
+
(overlay.events.font_size, self._on_font_size_change),
|
|
48
|
+
(overlay.events.marker_size, self._on_marker_size_change),
|
|
49
|
+
(overlay.events.row_spacing, self._on_row_spacing_change),
|
|
50
|
+
(overlay.events.padding, self._on_padding_change),
|
|
51
|
+
(overlay.events.background_color, self._on_background_color_change),
|
|
52
|
+
(overlay.events.border_color, self._on_border_color_change),
|
|
53
|
+
(overlay.events.border_width, self._on_border_width_change),
|
|
54
|
+
)
|
|
55
|
+
for signal, callback in self._overlay_connections:
|
|
56
|
+
signal.connect(callback)
|
|
57
|
+
get_settings().appearance.events.font_size.connect(self._on_font_size_change)
|
|
52
58
|
|
|
53
59
|
# noinspection PyAttributeOutsideInit
|
|
54
60
|
def make_panel(self) -> QFormLayout:
|
|
@@ -88,7 +94,7 @@ class QtLegendControls(QtFramelessPopup):
|
|
|
88
94
|
4,
|
|
89
95
|
32,
|
|
90
96
|
step_size=1,
|
|
91
|
-
value=overlay.
|
|
97
|
+
value=overlay.effective_font_size,
|
|
92
98
|
func=self.on_change_font_size,
|
|
93
99
|
)
|
|
94
100
|
self.marker_size_spinbox = hp.make_double_slider_with_text(
|
|
@@ -196,7 +202,7 @@ class QtLegendControls(QtFramelessPopup):
|
|
|
196
202
|
|
|
197
203
|
def _on_font_size_change(self, _event=None) -> None:
|
|
198
204
|
with qt_signals_blocked(self.font_size_spinbox):
|
|
199
|
-
self.font_size_spinbox.setValue(self.viewer.legend.
|
|
205
|
+
self.font_size_spinbox.setValue(self.viewer.legend.effective_font_size)
|
|
200
206
|
|
|
201
207
|
def on_change_marker_size(self) -> None:
|
|
202
208
|
"""Update legend marker size."""
|
|
@@ -232,7 +238,9 @@ class QtLegendControls(QtFramelessPopup):
|
|
|
232
238
|
|
|
233
239
|
def close(self) -> None:
|
|
234
240
|
"""Disconnect overlay events before closing."""
|
|
235
|
-
|
|
241
|
+
for signal, callback in self._overlay_connections:
|
|
242
|
+
signal.disconnect(callback)
|
|
243
|
+
disconnect_events(get_settings().appearance.events, self)
|
|
236
244
|
super().close()
|
|
237
245
|
|
|
238
246
|
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""Appearance controls for bands and error bars."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
|
|
7
|
+
import qtextra.helpers as hp
|
|
8
|
+
from napari._qt.utils import qt_signals_blocked
|
|
9
|
+
|
|
10
|
+
from napari_plot._qt.layer_controls.qt_layer_controls_base import QtLayerControls
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
import numpy as np
|
|
14
|
+
|
|
15
|
+
from napari_plot.layers import Band, ErrorBar
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class QtBandControls(QtLayerControls):
|
|
19
|
+
"""Edit band color, opacity, and blending."""
|
|
20
|
+
|
|
21
|
+
layer: Band
|
|
22
|
+
|
|
23
|
+
def __init__(self, layer: Band) -> None:
|
|
24
|
+
super().__init__(layer)
|
|
25
|
+
self.fill_color_swatch = hp.make_swatch(self, layer.fill_color, func=self._set_fill_color)
|
|
26
|
+
layer.events.fill_color.connect(self._on_fill_color_change)
|
|
27
|
+
|
|
28
|
+
self.layout().addRow(self.button_grid)
|
|
29
|
+
self.layout().addRow(self.opacity_label, self.opacity_slider)
|
|
30
|
+
self.layout().addRow(hp.make_label(self, "blending"), self.blending_combobox)
|
|
31
|
+
self.layout().addRow(hp.make_label(self, "fill color"), self.fill_color_swatch)
|
|
32
|
+
|
|
33
|
+
def _set_fill_color(self, value: np.ndarray) -> None:
|
|
34
|
+
self.layer.fill_color = value
|
|
35
|
+
|
|
36
|
+
def _on_fill_color_change(self) -> None:
|
|
37
|
+
with qt_signals_blocked(self.fill_color_swatch):
|
|
38
|
+
self.fill_color_swatch.set_color(self.layer.fill_color, force=True)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class QtErrorBarControls(QtLayerControls):
|
|
42
|
+
"""Edit the appearance of error bar stems and caps."""
|
|
43
|
+
|
|
44
|
+
layer: ErrorBar
|
|
45
|
+
|
|
46
|
+
def __init__(self, layer: ErrorBar) -> None:
|
|
47
|
+
super().__init__(layer)
|
|
48
|
+
self.color_swatch = hp.make_swatch(self, layer.color, func=self._set_color)
|
|
49
|
+
self.width_spinbox = hp.make_double_spin_box(
|
|
50
|
+
self, minimum=0.01, maximum=20, n_decimals=1, step_size=0.5, value=layer.width, func=self._set_width
|
|
51
|
+
)
|
|
52
|
+
self.cap_size_spinbox = hp.make_double_spin_box(
|
|
53
|
+
self, minimum=0, maximum=20, n_decimals=1, step_size=0.5, value=layer.cap_size, func=self._set_cap_size
|
|
54
|
+
)
|
|
55
|
+
layer.events.color.connect(self._on_color_change)
|
|
56
|
+
layer.events.width.connect(self._on_width_change)
|
|
57
|
+
layer.events.cap_size.connect(self._on_cap_size_change)
|
|
58
|
+
|
|
59
|
+
self.layout().addRow(self.button_grid)
|
|
60
|
+
self.layout().addRow(self.opacity_label, self.opacity_slider)
|
|
61
|
+
self.layout().addRow(hp.make_label(self, "blending"), self.blending_combobox)
|
|
62
|
+
self.layout().addRow(hp.make_label(self, "color"), self.color_swatch)
|
|
63
|
+
self.layout().addRow(hp.make_label(self, "line width (px)"), self.width_spinbox)
|
|
64
|
+
self.layout().addRow(hp.make_label(self, "cap size (px)"), self.cap_size_spinbox)
|
|
65
|
+
|
|
66
|
+
def _set_color(self, value: np.ndarray) -> None:
|
|
67
|
+
self.layer.color = value
|
|
68
|
+
|
|
69
|
+
def _set_width(self, value: float) -> None:
|
|
70
|
+
self.layer.width = value
|
|
71
|
+
|
|
72
|
+
def _set_cap_size(self, value: float) -> None:
|
|
73
|
+
self.layer.cap_size = value
|
|
74
|
+
|
|
75
|
+
def _on_color_change(self) -> None:
|
|
76
|
+
with qt_signals_blocked(self.color_swatch):
|
|
77
|
+
self.color_swatch.set_color(self.layer.color, force=True)
|
|
78
|
+
|
|
79
|
+
def _on_width_change(self) -> None:
|
|
80
|
+
with qt_signals_blocked(self.width_spinbox):
|
|
81
|
+
self.width_spinbox.setValue(self.layer.width)
|
|
82
|
+
|
|
83
|
+
def _on_cap_size_change(self) -> None:
|
|
84
|
+
with qt_signals_blocked(self.cap_size_spinbox):
|
|
85
|
+
self.cap_size_spinbox.setValue(self.layer.cap_size)
|
{napari_plot-0.3.1 → napari_plot-0.4.1}/napari_plot/_qt/layer_controls/qt_layer_controls_base.py
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import typing as ty
|
|
4
4
|
|
|
5
5
|
import qtextra.helpers as hp
|
|
6
|
-
from napari.layers.base._base_constants import
|
|
6
|
+
from napari.layers.base._base_constants import Blending, Mode
|
|
7
7
|
from napari.utils.events import disconnect_events
|
|
8
8
|
from qtpy.QtCore import Qt
|
|
9
9
|
from qtpy.QtWidgets import QButtonGroup, QFormLayout, QFrame, QGridLayout
|
|
@@ -97,7 +97,7 @@ class QtLayerControls(QFrame):
|
|
|
97
97
|
|
|
98
98
|
# Blending
|
|
99
99
|
self.blending_combobox = hp.make_combobox(self)
|
|
100
|
-
hp.set_combobox_data(self.blending_combobox,
|
|
100
|
+
hp.set_combobox_data(self.blending_combobox, {mode: str(mode) for mode in Blending}, self.layer.blending)
|
|
101
101
|
self.blending_combobox.currentTextChanged.connect(self.on_change_blending)
|
|
102
102
|
|
|
103
103
|
# opaque and minimum blending do not support changing alpha
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"""Layer controls."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
|
|
7
|
+
import napari._qt.layer_controls.qt_layer_controls_container
|
|
8
|
+
import qtextra.helpers as hp
|
|
9
|
+
from napari._qt.layer_controls.dynamic.qt_dynamic_layer_controls import QtDynamicLayerControls
|
|
10
|
+
from napari._qt.layer_controls.dynamic.widgets import QtOpacityBlendingControls
|
|
11
|
+
from napari._qt.layer_controls.qt_layer_controls_container import (
|
|
12
|
+
QtLayerControlsContainer as NapariQtLayerControlsContainer,
|
|
13
|
+
create_qt_layer_controls,
|
|
14
|
+
)
|
|
15
|
+
from napari.settings import get_settings
|
|
16
|
+
from napari.utils.events import Event
|
|
17
|
+
from qtpy.QtWidgets import QFrame
|
|
18
|
+
|
|
19
|
+
from napari_plot._qt.layer_controls.qt_bar_controls import QtBarControls
|
|
20
|
+
from napari_plot._qt.layer_controls.qt_centroids_controls import QtCentroidControls
|
|
21
|
+
from napari_plot._qt.layer_controls.qt_infline_controls import QtInfLineControls
|
|
22
|
+
from napari_plot._qt.layer_controls.qt_interval_controls import QtBandControls, QtErrorBarControls
|
|
23
|
+
from napari_plot._qt.layer_controls.qt_line_controls import QtLineControls
|
|
24
|
+
from napari_plot._qt.layer_controls.qt_multiline_controls import QtMultiLineControls
|
|
25
|
+
from napari_plot._qt.layer_controls.qt_rectangles_controls import QtRectanglesControls
|
|
26
|
+
from napari_plot._qt.layer_controls.qt_region_controls import QtRegionControls
|
|
27
|
+
from napari_plot._qt.layer_controls.qt_scatter_controls import QtScatterControls
|
|
28
|
+
from napari_plot._qt.layer_controls.qt_text_controls import QtTextControls
|
|
29
|
+
from napari_plot.layers import (
|
|
30
|
+
Band,
|
|
31
|
+
Bar,
|
|
32
|
+
Centroids,
|
|
33
|
+
ErrorBar,
|
|
34
|
+
InfLine,
|
|
35
|
+
Line,
|
|
36
|
+
MultiLine,
|
|
37
|
+
Rectangles,
|
|
38
|
+
Region,
|
|
39
|
+
Scatter,
|
|
40
|
+
Text,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
if TYPE_CHECKING:
|
|
44
|
+
from napari.layers import Layer
|
|
45
|
+
|
|
46
|
+
from napari_plot.components.viewer_model import ViewerModel
|
|
47
|
+
|
|
48
|
+
layer_to_controls = {
|
|
49
|
+
Band: QtBandControls,
|
|
50
|
+
Bar: QtBarControls,
|
|
51
|
+
ErrorBar: QtErrorBarControls,
|
|
52
|
+
Line: QtLineControls,
|
|
53
|
+
Centroids: QtCentroidControls,
|
|
54
|
+
Scatter: QtScatterControls,
|
|
55
|
+
Rectangles: QtRectanglesControls,
|
|
56
|
+
Region: QtRegionControls,
|
|
57
|
+
InfLine: QtInfLineControls,
|
|
58
|
+
MultiLine: QtMultiLineControls,
|
|
59
|
+
Text: QtTextControls,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# need to overwrite napari' default mapping of layer : control of layers to add our custom layers
|
|
64
|
+
napari._qt.layer_controls.qt_layer_controls_container.layer_to_controls.update(layer_to_controls)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class QtSharedLayerControls(QFrame):
|
|
68
|
+
"""Edit opacity and blending across custom or mixed layer selections."""
|
|
69
|
+
|
|
70
|
+
ndisplay: int = 2
|
|
71
|
+
|
|
72
|
+
def __init__(self, layers: list[Layer]) -> None:
|
|
73
|
+
super().__init__()
|
|
74
|
+
self.setObjectName("layer")
|
|
75
|
+
self.controls = QtOpacityBlendingControls(layers, parent=self)
|
|
76
|
+
self._controls = [self.controls]
|
|
77
|
+
layout = hp.make_form_layout(parent=self)
|
|
78
|
+
for widgets in self.controls.get_widget_controls():
|
|
79
|
+
layout.addRow(*widgets)
|
|
80
|
+
|
|
81
|
+
def deleteLater(self) -> None:
|
|
82
|
+
"""Disconnect layer events before disposing of the selection panel."""
|
|
83
|
+
self.controls.disconnect_widget_controls()
|
|
84
|
+
super().deleteLater()
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class QtLayerControlsContainer(NapariQtLayerControlsContainer):
|
|
88
|
+
"""Layer controls container with built-in control styling metadata."""
|
|
89
|
+
|
|
90
|
+
def __init__(self, viewer: ViewerModel) -> None:
|
|
91
|
+
super().__init__(viewer)
|
|
92
|
+
for layer in viewer.layers:
|
|
93
|
+
self._add(Event("inserted", value=layer))
|
|
94
|
+
self._populate()
|
|
95
|
+
|
|
96
|
+
def _add(self, event: Event) -> None:
|
|
97
|
+
"""Add controls and mark those supplied by napari for scoped QSS rules."""
|
|
98
|
+
layer = event.value
|
|
99
|
+
controls = create_qt_layer_controls(layer)
|
|
100
|
+
controls.ndisplay = self.viewer.dims.ndisplay
|
|
101
|
+
self.addWidget(controls)
|
|
102
|
+
self.widgets[layer] = controls
|
|
103
|
+
controls.setProperty(
|
|
104
|
+
"napari_builtin",
|
|
105
|
+
controls.__class__.__module__.startswith("napari."),
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
def _remove(self, event: Event) -> None:
|
|
109
|
+
controls = self.widgets.pop(event.value)
|
|
110
|
+
self.removeWidget(controls)
|
|
111
|
+
controls.hide()
|
|
112
|
+
controls.deleteLater()
|
|
113
|
+
|
|
114
|
+
def _populate(self) -> None:
|
|
115
|
+
if self.panel is not None:
|
|
116
|
+
self.removeWidget(self.panel)
|
|
117
|
+
self.panel.hide()
|
|
118
|
+
self.panel.deleteLater()
|
|
119
|
+
self.panel = None
|
|
120
|
+
layers = [layer for layer in self.viewer.layers if layer in self.viewer.layers.selection]
|
|
121
|
+
if not layers:
|
|
122
|
+
self.setCurrentWidget(self.empty_widget)
|
|
123
|
+
return
|
|
124
|
+
custom = any(isinstance(layer, tuple(layer_to_controls)) for layer in layers)
|
|
125
|
+
if len(layers) == 1 and (custom or not get_settings().experimental.dynamic_layer_controls):
|
|
126
|
+
self.setCurrentWidget(self.widgets[layers[0]])
|
|
127
|
+
return
|
|
128
|
+
self.panel = QtSharedLayerControls(layers) if custom else QtDynamicLayerControls(layers)
|
|
129
|
+
self.panel.ndisplay = self.viewer.dims.ndisplay
|
|
130
|
+
self.addWidget(self.panel)
|
|
131
|
+
self.setCurrentWidget(self.panel)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
__all__ = [
|
|
135
|
+
"QtBarControls",
|
|
136
|
+
"QtCentroidControls",
|
|
137
|
+
"QtInfLineControls",
|
|
138
|
+
"QtLayerControlsContainer",
|
|
139
|
+
"QtLineControls",
|
|
140
|
+
"QtMultiLineControls",
|
|
141
|
+
"QtRectanglesControls",
|
|
142
|
+
"QtRegionControls",
|
|
143
|
+
"QtScatterControls",
|
|
144
|
+
"QtTextControls",
|
|
145
|
+
"layer_to_controls",
|
|
146
|
+
]
|