plopp 25.4.0__tar.gz → 25.5.0__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.
- {plopp-25.4.0 → plopp-25.5.0}/PKG-INFO +1 -1
- {plopp-25.4.0 → plopp-25.5.0}/pyproject.toml +1 -2
- {plopp-25.4.0 → plopp-25.5.0}/requirements/base.txt +1 -1
- {plopp-25.4.0 → plopp-25.5.0}/requirements/basetest.txt +1 -1
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/matplotlib/line.py +18 -22
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/plotly/line.py +12 -11
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/graphics/graphicalview.py +15 -9
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/common.py +37 -12
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/plot.py +2 -6
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp.egg-info/PKG-INFO +1 -1
- {plopp-25.4.0 → plopp-25.5.0}/tests/backends/matplotlib/mpl_line_test.py +42 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/backends/matplotlib/mpl_plot_test.py +9 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/graphics/canvas_test.py +16 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/plotting/common_test.py +33 -2
- {plopp-25.4.0 → plopp-25.5.0}/tests/plotting/plot_1d_test.py +10 -0
- {plopp-25.4.0 → plopp-25.5.0}/.copier-answers.yml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.github/dependabot.yml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.github/workflows/ci.yml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.github/workflows/docs.yml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.github/workflows/nightly_at_main.yml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.github/workflows/nightly_at_release.yml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.github/workflows/python-version-ci +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.github/workflows/release.yml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.github/workflows/test.yml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.github/workflows/unpinned.yml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.github/workflows/weekly_windows_macos.yml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.gitignore +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.pre-commit-config.yaml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/.python-version +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/CODE_OF_CONDUCT.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/CONTRIBUTING.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/LICENSE +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/MANIFEST.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/README.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/conda/meta.yaml +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/anaconda-icon.js +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/circle-exclamation.svg +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/custom.css +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/customization/custom-interfaces.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/customization/graph-node-tips.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/customization/subplots.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/customization/tweaking-figures.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/favicon.ico +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/gallery/README.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/gallery/peeling-layers-thumbnail.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/gallery/scatter3d-with-slider-thumbnail.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/gallery/scatter3d-with-threshold-thumbnail.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/logo-dark.svg +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/logo-large-dark.svg +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/logo-large.svg +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/logo.svg +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/plotting/image-plot.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/plotting/inspector-plot.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/plotting/line-plot.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/plotting/mesh3d-plot.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/plotting/scatter-plot.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/plotting/scatter3d-plot.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/plotting/slicer-plot.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_static/plotting/super-plot.png +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_templates/class-template.rst +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_templates/doc_version.html +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_templates/module-template.rst +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_templates/scipp-class-template.rst +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/_templates/scipp-module-template.rst +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/about/index.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/api-reference/index.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/api-reference/matplotlib.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/api-reference/plotly.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/api-reference/pythreejs.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/conf.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/customization/custom-interfaces.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/customization/graph-node-tips.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/customization/index.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/customization/subplots.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/customization/tweaking-figures.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/developer/coding-conventions.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/developer/dependency-management.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/developer/getting-started.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/developer/index.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/index.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/interactive-masking.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/masking-a-range.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/nyc-taxi.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/peeling-layers.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/polar-plots.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/rectangle-selection.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/scatter3d-with-slider.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/scatter3d-with-threshold.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/streaming-plot.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/tiled-random-samples.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/gallery/updating-scatter.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/getting-started/index.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/getting-started/installation.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/getting-started/numpy-pandas-xarray.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/getting-started/overview.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/getting-started/saving-figures.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/index.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/plotting/image-plot.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/plotting/index.md +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/plotting/inspector-plot.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/plotting/line-plot.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/plotting/mesh3d-plot.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/plotting/scatter-plot.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/plotting/scatter3d-plot.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/plotting/slicer-plot.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/docs/plotting/super-plot.ipynb +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/base.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/basetest.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/ci.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/ci.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/dev.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/dev.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/docs.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/docs.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/make_base.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/mini.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/mini.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/mypy.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/mypy.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/nightly.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/nightly.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/noplotly.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/noplotly.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/static.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/static.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/test.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/test.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/wheels.in +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/requirements/wheels.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/resources/logo-plopp-2022.svg +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/setup.cfg +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/__init__.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/__init__.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/common.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/matplotlib/__init__.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/matplotlib/canvas.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/matplotlib/fast_image.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/matplotlib/figure.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/matplotlib/image.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/matplotlib/mesh_image.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/matplotlib/scatter.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/matplotlib/tiled.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/matplotlib/utils.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/plotly/__init__.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/plotly/canvas.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/plotly/figure.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/pythreejs/__init__.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/pythreejs/canvas.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/pythreejs/figure.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/pythreejs/mesh3d.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/pythreejs/outline.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/backends/pythreejs/scatter3d.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/core/__init__.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/core/__init__.pyi +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/core/graph.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/core/helpers.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/core/limits.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/core/node_class.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/core/typing.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/core/utils.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/core/view.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/data/__init__.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/data/examples.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/data/factory.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/data/testing.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/graphics/__init__.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/graphics/__init__.pyi +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/graphics/basefig.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/graphics/bbox.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/graphics/camera.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/graphics/colormapper.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/graphics/figures.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/graphics/tiled.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/__init__.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/__init__.pyi +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/inspector.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/mesh3d.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/scatter.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/scatter3d.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/slicer.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/superplot.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/plotting/xyplot.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/py.typed +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/utils.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/__init__.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/__init__.pyi +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/box.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/checkboxes.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/clip3d.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/debounce.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/drawing.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/linesave.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/slice.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/style.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/toolbar.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp/widgets/tools.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp.egg-info/SOURCES.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp.egg-info/dependency_links.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp.egg-info/requires.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/src/plopp.egg-info/top_level.txt +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/backends/matplotlib/mpl_image_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/backends/matplotlib/mpl_scatter_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/backends/matplotlib/mpl_tiled_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/backends/plotly/conftest.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/backends/plotly/plotly_line_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/backends/pythreejs/pythreejs_canvas_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/backends/pythreejs/pythreejs_scatter3d_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/conftest.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/core/graph_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/core/limits_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/core/node_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/core/utils_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/graphics/artists_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/graphics/colormapper_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/graphics/figures_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/high_level_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/minimal_plot_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/package_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/plotting/inspector_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/plotting/mesh3d_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/plotting/plot_2d_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/plotting/scatter3d_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/plotting/scatter_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/plotting/slicer_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/plotting/superplot_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/plotting/xyplot_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/widgets/box_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/widgets/checkboxes_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/widgets/clip3d_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tests/widgets/slice_test.py +0 -0
- {plopp-25.4.0 → plopp-25.5.0}/tox.ini +0 -0
|
@@ -81,10 +81,9 @@ filterwarnings = [
|
|
|
81
81
|
'ignore:Passing unrecognized arguments to super:DeprecationWarning',
|
|
82
82
|
'ignore:Jupyter is migrating its paths:DeprecationWarning',
|
|
83
83
|
'ignore:setDaemon\(\) is deprecated, set the daemon attribute instead:DeprecationWarning',
|
|
84
|
-
'ignore:TriCutTool is deprecated::',
|
|
85
|
-
'ignore:Cut3dTool is deprecated::',
|
|
86
84
|
# Should be removed once https://github.com/plotly/plotly.py/issues/4997 is fixed
|
|
87
85
|
'ignore: \*scattermapbox\* is deprecated:DeprecationWarning',
|
|
86
|
+
'ignore:There is no current event loop:DeprecationWarning',
|
|
88
87
|
]
|
|
89
88
|
|
|
90
89
|
[tool.ruff]
|
|
@@ -81,6 +81,7 @@ class Line:
|
|
|
81
81
|
'linestyle': 'solid',
|
|
82
82
|
'linewidth': 1.5,
|
|
83
83
|
'color': f'C{artist_number}',
|
|
84
|
+
'zorder': 2,
|
|
84
85
|
}
|
|
85
86
|
markers = list(Line2D.markers.keys())
|
|
86
87
|
default_plot_style = {
|
|
@@ -88,6 +89,7 @@ class Line:
|
|
|
88
89
|
'linewidth': 1.5,
|
|
89
90
|
'marker': markers[(artist_number + 2) % len(markers)],
|
|
90
91
|
'color': f'C{artist_number}',
|
|
92
|
+
'zorder': 2,
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
if line_data["hist"]:
|
|
@@ -95,40 +97,35 @@ class Line:
|
|
|
95
97
|
line_data['values']['x'],
|
|
96
98
|
line_data['values']['y'],
|
|
97
99
|
label=self.label,
|
|
98
|
-
zorder=10,
|
|
99
100
|
**{**default_step_style, **line_args},
|
|
100
101
|
)[0]
|
|
101
102
|
|
|
102
103
|
self._mask = self._ax.step(line_data['mask']['x'], line_data['mask']['y'])[
|
|
103
104
|
0
|
|
104
105
|
]
|
|
105
|
-
self._mask.update_from(self._line)
|
|
106
|
-
self._mask.set_color(mask_color)
|
|
107
|
-
self._mask.set_label(None)
|
|
108
|
-
self._mask.set_linewidth(self._mask.get_linewidth() * 3)
|
|
109
|
-
self._mask.set_zorder(self._mask.get_zorder() - 1)
|
|
110
|
-
self._mask.set_visible(line_data['mask']['visible'])
|
|
111
106
|
else:
|
|
112
107
|
self._line = self._ax.plot(
|
|
113
108
|
line_data['values']['x'],
|
|
114
109
|
line_data['values']['y'],
|
|
115
110
|
label=self.label,
|
|
116
|
-
zorder=10,
|
|
117
111
|
**{**default_plot_style, **line_args},
|
|
118
112
|
)[0]
|
|
119
|
-
self._mask = self._ax.plot(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
zorder=11,
|
|
123
|
-
mec=mask_color,
|
|
124
|
-
mfc="None",
|
|
125
|
-
mew=3.0,
|
|
126
|
-
linestyle="none",
|
|
127
|
-
marker=self._line.get_marker(),
|
|
128
|
-
visible=line_data['mask']['visible'],
|
|
129
|
-
)[0]
|
|
113
|
+
self._mask = self._ax.plot(line_data['mask']['x'], line_data['mask']['y'])[
|
|
114
|
+
0
|
|
115
|
+
]
|
|
130
116
|
|
|
131
|
-
self.
|
|
117
|
+
self._mask.update_from(self._line)
|
|
118
|
+
self._mask.set_color(mask_color)
|
|
119
|
+
self._mask.set_label(None)
|
|
120
|
+
self._mask.set_visible(line_data['mask']['visible'])
|
|
121
|
+
if self._line.get_marker().lower() != 'none':
|
|
122
|
+
self._mask.set(
|
|
123
|
+
mec=mask_color, mfc='None', mew=3.0, zorder=self._line.get_zorder() + 1
|
|
124
|
+
)
|
|
125
|
+
if self._line.get_linestyle().lower() != 'none':
|
|
126
|
+
self._mask.set(
|
|
127
|
+
lw=self._line.get_linewidth() * 3, zorder=self._line.get_zorder() - 1
|
|
128
|
+
)
|
|
132
129
|
|
|
133
130
|
# Add error bars
|
|
134
131
|
if errorbars and (line_data['stddevs'] is not None):
|
|
@@ -137,7 +134,7 @@ class Line:
|
|
|
137
134
|
line_data['stddevs']['y'],
|
|
138
135
|
yerr=line_data['stddevs']['e'],
|
|
139
136
|
color=self._line.get_color(),
|
|
140
|
-
zorder=
|
|
137
|
+
zorder=self._line.get_zorder(),
|
|
141
138
|
fmt="none",
|
|
142
139
|
)
|
|
143
140
|
|
|
@@ -153,7 +150,6 @@ class Line:
|
|
|
153
150
|
check_ndim(new_values, ndim=1, origin='Line')
|
|
154
151
|
self._data = new_values
|
|
155
152
|
line_data = make_line_data(data=self._data, dim=self._dim)
|
|
156
|
-
self.line_mask = sc.array(dims=['x'], values=~np.isnan(line_data['mask']['y']))
|
|
157
153
|
|
|
158
154
|
self._line.set_data(line_data['values']['x'], line_data['values']['y'])
|
|
159
155
|
self._mask.set_data(line_data['mask']['x'], line_data['mask']['y'])
|
|
@@ -60,7 +60,7 @@ class Line:
|
|
|
60
60
|
artist_number: int = 0,
|
|
61
61
|
errorbars: bool = True,
|
|
62
62
|
mask_color: str = 'black',
|
|
63
|
-
mode: str =
|
|
63
|
+
mode: str | None = None,
|
|
64
64
|
marker: str | None = None,
|
|
65
65
|
**kwargs,
|
|
66
66
|
):
|
|
@@ -87,14 +87,17 @@ class Line:
|
|
|
87
87
|
'color': default_colors[artist_number % len(default_colors)]
|
|
88
88
|
}
|
|
89
89
|
default_marker_style = {
|
|
90
|
-
'symbol': artist_number %
|
|
91
|
-
}
|
|
90
|
+
'symbol': artist_number % 52 # Plotly has 52 marker styles
|
|
91
|
+
}
|
|
92
92
|
|
|
93
93
|
line_shape = None
|
|
94
94
|
|
|
95
|
-
if
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
if mode is None:
|
|
96
|
+
if line_data["hist"]:
|
|
97
|
+
line_shape = 'vh'
|
|
98
|
+
mode = 'lines'
|
|
99
|
+
else:
|
|
100
|
+
mode = 'markers'
|
|
98
101
|
|
|
99
102
|
marker_style = default_marker_style if marker is None else marker
|
|
100
103
|
line_style = {**default_line_style, **line_args}
|
|
@@ -130,7 +133,7 @@ class Line:
|
|
|
130
133
|
line_style['width'] *= 5
|
|
131
134
|
else:
|
|
132
135
|
line_style['width'] = 5
|
|
133
|
-
if
|
|
136
|
+
if 'lines' in mode:
|
|
134
137
|
line_style['color'] = mask_color
|
|
135
138
|
|
|
136
139
|
self._mask = go.Scatter(
|
|
@@ -149,7 +152,7 @@ class Line:
|
|
|
149
152
|
# that ends up in the figure is a copy of the one above.
|
|
150
153
|
# Plotly has no concept of zorder, so we need to add the traces in a specific
|
|
151
154
|
# order
|
|
152
|
-
if
|
|
155
|
+
if 'lines' in mode:
|
|
153
156
|
self._fig.add_trace(self._mask)
|
|
154
157
|
self._mask = self._fig.data[-1]
|
|
155
158
|
self._fig.add_trace(self._line)
|
|
@@ -165,9 +168,8 @@ class Line:
|
|
|
165
168
|
self._error = self._fig.data[-1]
|
|
166
169
|
self._fig.add_trace(self._mask)
|
|
167
170
|
self._mask = self._fig.data[-1]
|
|
168
|
-
self._line._plopp_id = self.uid
|
|
169
|
-
self.line_mask = sc.array(dims=['x'], values=~np.isnan(line_data['mask']['y']))
|
|
170
171
|
|
|
172
|
+
self._line._plopp_id = self.uid
|
|
171
173
|
self._mask._plopp_id = self.uid
|
|
172
174
|
if self._error is not None:
|
|
173
175
|
self._error._plopp_id = self.uid
|
|
@@ -184,7 +186,6 @@ class Line:
|
|
|
184
186
|
check_ndim(new_values, ndim=1, origin='Line')
|
|
185
187
|
self._data = new_values
|
|
186
188
|
line_data = make_line_data(data=self._data, dim=self._dim)
|
|
187
|
-
self.line_mask = sc.array(dims=['x'], values=~np.isnan(line_data['mask']['y']))
|
|
188
189
|
|
|
189
190
|
with self._fig.batch_update():
|
|
190
191
|
self._line.update(
|
|
@@ -21,6 +21,15 @@ def _none_if_not_finite(x: float | None) -> float | int | None:
|
|
|
21
21
|
return x if np.isfinite(x) else None
|
|
22
22
|
|
|
23
23
|
|
|
24
|
+
def _make_range(
|
|
25
|
+
old: tuple[float, float], new: tuple[float, float]
|
|
26
|
+
) -> tuple[float | None, float | None]:
|
|
27
|
+
new = (_none_if_not_finite(new[0]), _none_if_not_finite(new[1]))
|
|
28
|
+
if (old is not None) and (None not in old) and (old[0] > old[1]):
|
|
29
|
+
new = (new[1], new[0])
|
|
30
|
+
return new
|
|
31
|
+
|
|
32
|
+
|
|
24
33
|
class GraphicalView(View):
|
|
25
34
|
"""
|
|
26
35
|
Base class for graphical 1d and 2d views.
|
|
@@ -113,18 +122,15 @@ class GraphicalView(View):
|
|
|
113
122
|
bbox = bbox.union(artist.bbox(**scales))
|
|
114
123
|
self.bbox = bbox
|
|
115
124
|
self.bbox = self.bbox.override(self.canvas.bbox)
|
|
116
|
-
self.canvas.xrange = (
|
|
117
|
-
|
|
118
|
-
_none_if_not_finite(self.bbox.xmax),
|
|
125
|
+
self.canvas.xrange = _make_range(
|
|
126
|
+
old=self.canvas.xrange, new=(self.bbox.xmin, self.bbox.xmax)
|
|
119
127
|
)
|
|
120
|
-
self.canvas.yrange = (
|
|
121
|
-
|
|
122
|
-
_none_if_not_finite(self.bbox.ymax),
|
|
128
|
+
self.canvas.yrange = _make_range(
|
|
129
|
+
old=self.canvas.yrange, new=(self.bbox.ymin, self.bbox.ymax)
|
|
123
130
|
)
|
|
124
131
|
if hasattr(self.canvas, 'zrange'):
|
|
125
|
-
self.canvas.zrange = (
|
|
126
|
-
|
|
127
|
-
_none_if_not_finite(self.bbox.zmax),
|
|
132
|
+
self.canvas.zrange = _make_range(
|
|
133
|
+
old=self.canvas.zrange, new=(self.bbox.zmin, self.bbox.zmax)
|
|
128
134
|
)
|
|
129
135
|
|
|
130
136
|
def update(self, *args, **kwargs) -> None:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
|
|
3
3
|
|
|
4
4
|
import warnings
|
|
5
|
-
from collections.abc import Callable
|
|
5
|
+
from collections.abc import Callable, Iterable
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
8
|
import numpy as np
|
|
@@ -76,8 +76,30 @@ def to_variable(obj) -> sc.Variable:
|
|
|
76
76
|
return out
|
|
77
77
|
|
|
78
78
|
|
|
79
|
+
def _ensure_data_array_coords(
|
|
80
|
+
da: sc.DataArray, coords: list[str] | None
|
|
81
|
+
) -> sc.DataArray:
|
|
82
|
+
if coords is None:
|
|
83
|
+
coords = list(da.dims)
|
|
84
|
+
elif missing := set(coords) - set(da.coords.keys()):
|
|
85
|
+
raise ValueError(f"Specified coords do not exist: {missing}")
|
|
86
|
+
|
|
87
|
+
# Remove unused coords
|
|
88
|
+
da = da.drop_coords(list(set(da.coords) - set(coords)))
|
|
89
|
+
# Assign dim coords where missing. The above checks ensure that all missing
|
|
90
|
+
# coords are dim coords, i.e., that `name in out.dims`.
|
|
91
|
+
da = da.assign_coords(
|
|
92
|
+
{
|
|
93
|
+
name: sc.arange(name, da.sizes[name], unit=None)
|
|
94
|
+
for name in set(coords) - set(da.coords)
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
return da
|
|
98
|
+
|
|
99
|
+
|
|
79
100
|
def to_data_array(
|
|
80
101
|
obj: Plottable | list,
|
|
102
|
+
coords: list[str] | None = None,
|
|
81
103
|
) -> sc.DataArray:
|
|
82
104
|
"""
|
|
83
105
|
Convert an input to a DataArray, potentially adding fake coordinates if they are
|
|
@@ -87,6 +109,8 @@ def to_data_array(
|
|
|
87
109
|
----------
|
|
88
110
|
obj:
|
|
89
111
|
The input object to be converted.
|
|
112
|
+
coords:
|
|
113
|
+
If supplied, use these coords instead of the input's dimension coordinates.
|
|
90
114
|
"""
|
|
91
115
|
out = _maybe_to_variable(obj)
|
|
92
116
|
if isinstance(out, sc.Variable):
|
|
@@ -94,15 +118,13 @@ def to_data_array(
|
|
|
94
118
|
out = from_compatible_lib(out)
|
|
95
119
|
if not isinstance(out, sc.DataArray):
|
|
96
120
|
raise TypeError(f"Cannot convert input of type {type(obj)} to a DataArray.")
|
|
97
|
-
out = out
|
|
98
|
-
for
|
|
99
|
-
if
|
|
100
|
-
out.coords[dim] = sc.arange(dim, size, unit=None)
|
|
101
|
-
if not out.coords[dim].dims:
|
|
121
|
+
out = _ensure_data_array_coords(out, coords)
|
|
122
|
+
for name, coord in out.coords.items():
|
|
123
|
+
if not coord.dims:
|
|
102
124
|
raise ValueError(
|
|
103
125
|
"Input data cannot be plotted: it has a scalar coordinate along "
|
|
104
|
-
f"dimension {
|
|
105
|
-
f"Use ``data.drop_coords('{
|
|
126
|
+
f"dimension {name}. Consider dropping this coordinate before plotting. "
|
|
127
|
+
f"Use ``data.drop_coords('{name}').plot()``."
|
|
106
128
|
)
|
|
107
129
|
for name in out.coords:
|
|
108
130
|
other_dims = [dim for dim in out.coords[name].dims if dim not in out.dims]
|
|
@@ -171,7 +193,7 @@ def preprocess(
|
|
|
171
193
|
obj: Plottable | list,
|
|
172
194
|
name: str | None = None,
|
|
173
195
|
ignore_size: bool = False,
|
|
174
|
-
coords:
|
|
196
|
+
coords: Iterable[str] | str | None = None,
|
|
175
197
|
) -> sc.DataArray:
|
|
176
198
|
"""
|
|
177
199
|
Pre-process input data for plotting.
|
|
@@ -192,7 +214,12 @@ def preprocess(
|
|
|
192
214
|
coords:
|
|
193
215
|
If supplied, use these coords instead of the input's dimension coordinates.
|
|
194
216
|
"""
|
|
195
|
-
|
|
217
|
+
if isinstance(coords, str):
|
|
218
|
+
coords = [coords]
|
|
219
|
+
elif coords is not None:
|
|
220
|
+
coords = list(coords)
|
|
221
|
+
|
|
222
|
+
out = to_data_array(obj, coords)
|
|
196
223
|
check_not_binned(out)
|
|
197
224
|
check_allowed_dtypes(out)
|
|
198
225
|
if name is not None:
|
|
@@ -201,8 +228,6 @@ def preprocess(
|
|
|
201
228
|
_check_size(out)
|
|
202
229
|
if coords is not None:
|
|
203
230
|
renamed_dims = {}
|
|
204
|
-
if isinstance(coords, str):
|
|
205
|
-
coords = [coords]
|
|
206
231
|
for dim in coords:
|
|
207
232
|
underlying = out.coords[dim].dims[-1]
|
|
208
233
|
if underlying in renamed_dims:
|
|
@@ -85,6 +85,7 @@ def plot(
|
|
|
85
85
|
"""
|
|
86
86
|
|
|
87
87
|
common_args = {
|
|
88
|
+
'aspect': aspect,
|
|
88
89
|
'grid': grid,
|
|
89
90
|
'norm': norm,
|
|
90
91
|
'scale': scale,
|
|
@@ -119,12 +120,7 @@ def plot(
|
|
|
119
120
|
elif ndim == 2:
|
|
120
121
|
if len(nodes) > 1:
|
|
121
122
|
raise_multiple_inputs_for_2d_plot_error(origin='plot')
|
|
122
|
-
return imagefigure(
|
|
123
|
-
*nodes,
|
|
124
|
-
aspect=aspect,
|
|
125
|
-
cbar=cbar,
|
|
126
|
-
**common_args,
|
|
127
|
-
)
|
|
123
|
+
return imagefigure(*nodes, cbar=cbar, **common_args)
|
|
128
124
|
else:
|
|
129
125
|
raise ValueError(
|
|
130
126
|
'The plot function can only plot 1d and 2d data, got input '
|
|
@@ -169,3 +169,45 @@ def test_line_color_with_errorbars():
|
|
|
169
169
|
assert line.color == 'C1'
|
|
170
170
|
assert line._line.get_color() == 'C1'
|
|
171
171
|
assert to_hex(line._error.get_children()[0].get_color()) == to_hex('C1')
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def test_kwarg_zorder():
|
|
175
|
+
line = Line(canvas=Canvas(), data=data_array(ndim=1), zorder=3)
|
|
176
|
+
assert line._line.get_zorder() == 3
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
def test_kwarg_zorder_masks():
|
|
180
|
+
line = Line(canvas=Canvas(), data=data_array(ndim=1, masks=True), zorder=5)
|
|
181
|
+
assert line._line.get_zorder() == 5
|
|
182
|
+
assert line._mask.get_zorder() > 5
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def test_kwarg_zorder_binedges():
|
|
186
|
+
line = Line(canvas=Canvas(), data=data_array(ndim=1, binedges=True), zorder=7)
|
|
187
|
+
assert line._line.get_zorder() == 7
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def test_kwarg_zorder_binedges_masks():
|
|
191
|
+
line = Line(
|
|
192
|
+
canvas=Canvas(), data=data_array(ndim=1, binedges=True, masks=True), zorder=9
|
|
193
|
+
)
|
|
194
|
+
assert line._line.get_zorder() == 9
|
|
195
|
+
assert line._mask.get_zorder() < 9
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def test_kwarg_zorder_errorbars():
|
|
199
|
+
line = Line(canvas=Canvas(), data=data_array(ndim=1, variances=True), zorder=12)
|
|
200
|
+
assert line._line.get_zorder() == 12
|
|
201
|
+
for artist in line._error.get_children():
|
|
202
|
+
assert artist.get_zorder() == 12
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def test_kwarg_zorder_binedges_errorbars():
|
|
206
|
+
line = Line(
|
|
207
|
+
canvas=Canvas(),
|
|
208
|
+
data=data_array(ndim=1, binedges=True, variances=True),
|
|
209
|
+
zorder=14,
|
|
210
|
+
)
|
|
211
|
+
assert line._line.get_zorder() == 14
|
|
212
|
+
for artist in line._error.get_children():
|
|
213
|
+
assert artist.get_zorder() == 14
|
|
@@ -193,3 +193,12 @@ def test_polar_axes_limits_small_range_fits_to_data():
|
|
|
193
193
|
fig = pp.plot(da, ax=ax)
|
|
194
194
|
assert fig.canvas.xmin > 0.0
|
|
195
195
|
assert fig.canvas.xmax < 2 * np.pi
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def test_aspect_ratio():
|
|
199
|
+
da = data_array(ndim=1)
|
|
200
|
+
fig = da.plot(aspect='equal')
|
|
201
|
+
assert fig.canvas.ax.get_aspect() == 1.0
|
|
202
|
+
da = data_array(ndim=2)
|
|
203
|
+
fig = da.plot(aspect='equal')
|
|
204
|
+
assert fig.canvas.ax.get_aspect() == 1.0
|
|
@@ -148,6 +148,22 @@ class TestCanvasNo3d:
|
|
|
148
148
|
assert canvas.xscale == 'linear'
|
|
149
149
|
assert canvas.yscale == 'log'
|
|
150
150
|
|
|
151
|
+
def test_xrange_order_preserved(self, set_backend, backend, figure, data):
|
|
152
|
+
da = data()
|
|
153
|
+
fig = figure(Node(da))
|
|
154
|
+
fig.canvas.xrange = (52.0, -5.0)
|
|
155
|
+
fig.view.autoscale()
|
|
156
|
+
new_range = fig.canvas.xrange
|
|
157
|
+
assert new_range[0] > new_range[1]
|
|
158
|
+
|
|
159
|
+
def test_yrange_order_preserved(self, set_backend, backend, figure, data):
|
|
160
|
+
da = data()
|
|
161
|
+
fig = figure(Node(da))
|
|
162
|
+
fig.canvas.yrange = (61.0, -6.6)
|
|
163
|
+
fig.view.autoscale()
|
|
164
|
+
new_range = fig.canvas.yrange
|
|
165
|
+
assert new_range[0] > new_range[1]
|
|
166
|
+
|
|
151
167
|
|
|
152
168
|
CASES1DINTERACTIVE = {
|
|
153
169
|
k: c for k, c in CASES.items() if (c[1] is linefigure and c[0][1] != 'mpl-static')
|
|
@@ -25,6 +25,14 @@ def test_preprocess_use_non_dimension_coords():
|
|
|
25
25
|
assert out.coords['yy2'].max() == 3.3 * da.coords['yy'].max()
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
def test_preprocess_use_non_dimension_coord_single_str():
|
|
29
|
+
da = data_array(ndim=1)
|
|
30
|
+
da.coords['xx2'] = 7.5 * da.coords['xx']
|
|
31
|
+
out = preprocess(da, coords='xx2')
|
|
32
|
+
assert set(out.dims) == {'xx2'}
|
|
33
|
+
assert out.coords['xx2'].max() == 7.5 * da.coords['xx'].max()
|
|
34
|
+
|
|
35
|
+
|
|
28
36
|
def test_preprocess_warns_when_coordinate_is_not_sorted():
|
|
29
37
|
da = data_array(ndim=1)
|
|
30
38
|
unsorted = sc.concat([da['xx', 20:], da['xx', :20]], dim='xx')
|
|
@@ -40,12 +48,12 @@ def test_preprocess_no_warning_if_dtype_cannot_be_sorted():
|
|
|
40
48
|
dims=['xx'], values=np.random.random((da.sizes['xx'], 3))
|
|
41
49
|
)
|
|
42
50
|
out = preprocess(da) # no warning should be emitted
|
|
43
|
-
assert 'vecs' in out.coords
|
|
51
|
+
assert 'vecs' not in out.coords # coord doesn't participate in plot
|
|
44
52
|
da.coords['strings'] = sc.array(
|
|
45
53
|
dims=['xx'], values=list('ba' * (da.sizes['xx'] // 2))
|
|
46
54
|
)
|
|
47
55
|
out = preprocess(da) # no warning should be emitted
|
|
48
|
-
assert 'strings' in out.coords
|
|
56
|
+
assert 'strings' not in out.coords # coord doesn't participate in plot
|
|
49
57
|
|
|
50
58
|
|
|
51
59
|
@pytest.mark.parametrize(
|
|
@@ -70,3 +78,26 @@ def test_preprocess_raises_for_unsupported_dtype(dtype_and_shape):
|
|
|
70
78
|
match=f'The input has dtype {dtype} which is not supported by Plopp',
|
|
71
79
|
):
|
|
72
80
|
preprocess(v)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def test_preprocess_drops_coords_that_are_not_plotted_dim_coords():
|
|
84
|
+
da = data_array(ndim=2)
|
|
85
|
+
da.coords['xx2'] = 7.5 * da.coords['xx']
|
|
86
|
+
da.coords['yy2'] = 3.3 * da.coords['yy']
|
|
87
|
+
out = preprocess(da)
|
|
88
|
+
assert set(out.coords) == {'xx', 'yy'}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def test_preprocess_drops_coords_that_are_not_plotted_custom_coords():
|
|
92
|
+
da = data_array(ndim=2)
|
|
93
|
+
da.coords['xx2'] = 7.5 * da.coords['xx']
|
|
94
|
+
da.coords['yy2'] = 3.3 * da.coords['yy']
|
|
95
|
+
out = preprocess(da, coords=['yy2', 'xx'])
|
|
96
|
+
assert set(out.coords) == {'xx', 'yy2'}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def test_preprocess_drops_coords_that_are_not_plotted_custom_coord_single_str():
|
|
100
|
+
da = data_array(ndim=1)
|
|
101
|
+
da.coords['xx2'] = 7.5 * da.coords['xx']
|
|
102
|
+
out = preprocess(da, coords='xx')
|
|
103
|
+
assert set(out.coords) == {'xx'}
|
|
@@ -414,6 +414,16 @@ def test_plot_1d_datetime_length_1():
|
|
|
414
414
|
pp.plot(da)
|
|
415
415
|
|
|
416
416
|
|
|
417
|
+
def test_plot_1d_extra_datetime_coord_binedges():
|
|
418
|
+
da = data_array(ndim=1)
|
|
419
|
+
dim = da.dim
|
|
420
|
+
size = da.sizes[dim]
|
|
421
|
+
da.coords['times'] = (sc.arange('t', 2 * size, unit='s') + sc.epoch(unit='s')).fold(
|
|
422
|
+
dim='t', sizes={dim: size, 't': 2}
|
|
423
|
+
)
|
|
424
|
+
pp.plot(da)
|
|
425
|
+
|
|
426
|
+
|
|
417
427
|
def test_plot_1d_data_with_errorbars():
|
|
418
428
|
da = data_array(ndim=1, variances=True)
|
|
419
429
|
p = da.plot()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|