Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: matplotlib/napari-matplotlib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.0
Choose a base ref
...
head repository: matplotlib/napari-matplotlib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.2.0
Choose a head ref

Commits on Aug 25, 2023

  1. Add testing on Python 3.11

    dstansby committed Aug 25, 2023
    Copy the full SHA
    dd74f27 View commit details
  2. Add tox environment

    dstansby committed Aug 25, 2023
    Copy the full SHA
    70b77de View commit details
  3. Update development status

    dstansby committed Aug 25, 2023
    Copy the full SHA
    cf74669 View commit details
  4. Add link to docs in README

    dstansby committed Aug 25, 2023
    Copy the full SHA
    719e608 View commit details
  5. Merge pull request #209 from dstansby/py311

    Add support for Python 3.11
    dstansby authored Aug 25, 2023
    Copy the full SHA
    98e1df8 View commit details

Commits on Aug 28, 2023

  1. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/astral-sh/ruff-pre-commit: v0.0.285 → v0.0.286](astral-sh/ruff-pre-commit@v0.0.285...v0.0.286)
    pre-commit-ci[bot] authored Aug 28, 2023
    Copy the full SHA
    81781d8 View commit details

Commits on Aug 29, 2023

  1. Merge pull request #210 from matplotlib/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    dstansby authored Aug 29, 2023
    Copy the full SHA
    a11c6cb View commit details

Commits on Sep 4, 2023

  1. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/astral-sh/ruff-pre-commit: v0.0.286 → v0.0.287](astral-sh/ruff-pre-commit@v0.0.286...v0.0.287)
    pre-commit-ci[bot] authored Sep 4, 2023
    Copy the full SHA
    ebe47b9 View commit details

Commits on Sep 5, 2023

  1. Merge pull request #211 from matplotlib/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    dstansby authored Sep 5, 2023
    Copy the full SHA
    59b9c89 View commit details

Commits on Sep 11, 2023

  1. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/psf/black: 23.7.0 → 23.9.1](psf/black@23.7.0...23.9.1)
    - [github.com/astral-sh/ruff-pre-commit: v0.0.287 → v0.0.288](astral-sh/ruff-pre-commit@v0.0.287...v0.0.288)
    pre-commit-ci[bot] authored Sep 11, 2023
    Copy the full SHA
    0e8b3b2 View commit details

Commits on Sep 12, 2023

  1. Merge pull request #212 from matplotlib/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    dstansby authored Sep 12, 2023
    Copy the full SHA
    53aa5ec View commit details

Commits on Oct 4, 2023

  1. Copy the full SHA
    064252b View commit details
  2. Create test.ipynb

    jo-mueller committed Oct 4, 2023
    Copy the full SHA
    42ce86d View commit details
  3. Copy the full SHA
    ee4f9a8 View commit details
  4. Copy the full SHA
    206f71f View commit details
  5. Copy the full SHA
    e3540c3 View commit details
  6. updated baselines

    jo-mueller committed Oct 4, 2023
    Copy the full SHA
    d65da10 View commit details
  7. Copy the full SHA
    b6312c3 View commit details
  8. Delete test.ipynb

    jo-mueller committed Oct 4, 2023
    Copy the full SHA
    073613c View commit details
  9. Copy the full SHA
    7179889 View commit details
  10. removed main from test

    jo-mueller committed Oct 4, 2023
    Copy the full SHA
    e7789a0 View commit details

Commits on Oct 8, 2023

  1. Pin Matplotlib to < 3.8

    dstansby committed Oct 8, 2023
    Copy the full SHA
    7177fb7 View commit details
  2. Copy the full SHA
    07c545b View commit details
  3. Merge pull request #217 from dstansby/mpl-pin

    Pin Matplotlib to < 3.8
    dstansby authored Oct 8, 2023
    Copy the full SHA
    3d4183c View commit details
  4. Copy the full SHA
    001dbca View commit details
  5. Copy the full SHA
    5b87710 View commit details

Commits on Oct 9, 2023

  1. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](pre-commit/pre-commit-hooks@v4.4.0...v4.5.0)
    - [github.com/astral-sh/ruff-pre-commit: v0.0.288 → v0.0.292](astral-sh/ruff-pre-commit@v0.0.288...v0.0.292)
    pre-commit-ci[bot] authored Oct 9, 2023
    Copy the full SHA
    1a1d509 View commit details
  2. Merge pull request #219 from matplotlib/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    dstansby authored Oct 9, 2023
    Copy the full SHA
    7d50765 View commit details

Commits on Oct 16, 2023

  1. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.6.0](pre-commit/mirrors-mypy@v1.5.1...v1.6.0)
    pre-commit-ci[bot] authored Oct 16, 2023
    Copy the full SHA
    96ffad3 View commit details
  2. Merge pull request #220 from matplotlib/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    dstansby authored Oct 16, 2023
    Copy the full SHA
    16084b2 View commit details

Commits on Oct 22, 2023

  1. Remove Python 3.8 support

    dstansby committed Oct 22, 2023
    Copy the full SHA
    09f4e91 View commit details
  2. Typing upgrades

    dstansby committed Oct 22, 2023
    Copy the full SHA
    d768a92 View commit details
  3. Merge pull request #222 from dstansby/nopy38

    Remove support for Python 3.8
    dstansby authored Oct 22, 2023
    Copy the full SHA
    c4c38c6 View commit details
  4. Remove Matplotlib pin

    dstansby committed Oct 22, 2023
    Copy the full SHA
    272ae95 View commit details
  5. Fix adding subplot

    dstansby committed Oct 22, 2023
    Copy the full SHA
    d8700f6 View commit details
  6. Fixup tests

    dstansby committed Oct 22, 2023
    Copy the full SHA
    a1c217a View commit details
  7. Make mypy happy

    dstansby committed Oct 22, 2023
    Copy the full SHA
    f253247 View commit details

Commits on Oct 23, 2023

  1. Merge pull request #221 from dstansby/mpl38

    Remove Matplotlib pin
    dstansby authored Oct 23, 2023
    Copy the full SHA
    edf6539 View commit details
  2. Clean tox file

    dstansby committed Oct 23, 2023
    Copy the full SHA
    f71a9ad View commit details
  3. Merge pull request #223 from dstansby/clean-tox

    Clean tox file
    dstansby authored Oct 23, 2023
    Copy the full SHA
    807fbfc View commit details
  4. pin pydantic in doc build

    dstansby committed Oct 23, 2023
    Copy the full SHA
    8512811 View commit details
  5. Merge pull request #224 from dstansby/fix-doc-build

    Fix doc build
    dstansby authored Oct 23, 2023
    Copy the full SHA
    5e59bd3 View commit details
  6. Remove old test figure

    dstansby committed Oct 23, 2023
    Copy the full SHA
    da5e304 View commit details
  7. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/psf/black: 23.9.1 → 23.10.0](psf/black@23.9.1...23.10.0)
    - [github.com/pre-commit/mirrors-mypy: v1.6.0 → v1.6.1](pre-commit/mirrors-mypy@v1.6.0...v1.6.1)
    - [github.com/astral-sh/ruff-pre-commit: v0.0.292 → v0.1.1](astral-sh/ruff-pre-commit@v0.0.292...v0.1.1)
    pre-commit-ci[bot] authored Oct 23, 2023
    Copy the full SHA
    2ba7671 View commit details

Commits on Oct 24, 2023

  1. Merge pull request #226 from matplotlib/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    dstansby authored Oct 24, 2023
    Copy the full SHA
    7042b46 View commit details

Commits on Oct 30, 2023

  1. Merge pull request #225 from dstansby/remove-old-figure

    Remove old test figure
    dstansby authored Oct 30, 2023
    Copy the full SHA
    dbda949 View commit details
  2. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/psf/black: 23.10.0 → 23.10.1](psf/black@23.10.0...23.10.1)
    - [github.com/astral-sh/ruff-pre-commit: v0.1.1 → v0.1.3](astral-sh/ruff-pre-commit@v0.1.1...v0.1.3)
    pre-commit-ci[bot] authored Oct 30, 2023
    Copy the full SHA
    ec6c7d5 View commit details
  3. Merge pull request #227 from matplotlib/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    dstansby authored Oct 30, 2023
    Copy the full SHA
    4516bd3 View commit details

Commits on Nov 2, 2023

  1. Copy the full SHA
    5df6b6b View commit details
  2. Update test figures

    dstansby committed Nov 2, 2023
    Copy the full SHA
    6d37c78 View commit details
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.10.1
hooks:
- id: black

@@ -17,14 +17,14 @@ repos:
- id: napari-plugin-checks

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.6.1
hooks:
- id: mypy
additional_dependencies: [numpy, matplotlib]

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.285'
rev: 'v0.1.3'
hooks:
- id: ruff

27 changes: 1 addition & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -15,32 +15,7 @@ A plugin to create Matplotlib plots from napari layers
## Introduction
`napari-matplotlib` is a bridge between `napari` and `matplotlib`, making it easy to create publication quality `Matplotlib` plots based on the data loaded in `napari` layers.

## Available widgets

### `Slice`
Plots 1D slices of data along a specified axis.
![](https://raw.githubusercontent.com/matplotlib/napari-matplotlib/main/examples/slice.png)

### `Histogram`
Plots histograms of individual image layers, or RGB histograms of an RGB image
![](https://raw.githubusercontent.com/matplotlib/napari-matplotlib/main/examples/hist.png)

### `Scatter`
Scatters the values of two similarly sized images layers against each other.
![](https://raw.githubusercontent.com/matplotlib/napari-matplotlib/main/examples/scatter.png)

## Installation

You can install `napari-matplotlib` via [pip]:

pip install napari-matplotlib



To install latest development version :

pip install git+https://github.com/matplotlib/napari-matplotlib.git

Documentaiton can be found at https://napari-matplotlib.github.io/

## Contributing

Binary file removed baseline/test_feature_histogram2.png
Binary file not shown.
8 changes: 8 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Changelog
=========
1.2.0
-----
Changes
~~~~~~~
- Dropped support for Python 3.8, and added support for Python 3.11.
- Histogram plots of points and vector layers are now coloured with their napari colourmap.
- Added support for Matplotlib 3.8

1.1.0
-----
Additions
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ profile = "black"
line_length = 79

[tool.ruff]
target-version = "py38"
target-version = "py39"
select = ["I", "UP", "F", "E", "W", "D"]
ignore = [
"D100", # Missing docstring in public module
@@ -45,7 +45,7 @@ fix = true
convention = "numpy"

[tool.mypy]
python_version = "3.8"
python_version = "3.9"
# Block below are checks that form part of mypy 'strict' mode
warn_unused_configs = true
warn_redundant_casts = true
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ author_email = d.stansby@ucl.ac.uk
license = BSD-3-Clause
license_files = LICENSE
classifiers =
Development Status :: 3 - Alpha
Development Status :: 5 - Production/Stable
Framework :: napari
Intended Audience :: Developers
License :: OSI Approved :: BSD License
@@ -31,7 +31,7 @@ install_requires =
napari
numpy
tinycss2
python_requires = >=3.8
python_requires = >=3.9
include_package_data = True
package_dir =
=src
@@ -49,6 +49,7 @@ napari.manifest =
docs =
napari[all]==0.4.17
numpydoc
pydantic<2
pydata-sphinx-theme
qtgallery
sphinx
26 changes: 12 additions & 14 deletions src/napari_matplotlib/base.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import os
from pathlib import Path
from typing import List, Optional, Tuple
from typing import Optional

import matplotlib
import matplotlib.style as mplstyle
import napari
from matplotlib.backends.backend_qtagg import (
FigureCanvas,
from matplotlib.backends.backend_qtagg import ( # type: ignore[attr-defined]
FigureCanvasQTAgg,
NavigationToolbar2QT,
)
from matplotlib.figure import Figure
@@ -49,12 +49,10 @@ def __init__(

# Sets figure.* style
with mplstyle.context(self.mpl_style_sheet_path):
self.canvas = FigureCanvas()
self.canvas = FigureCanvasQTAgg() # type: ignore[no-untyped-call]

self.canvas.figure.set_layout_engine("constrained")
self.toolbar = NapariNavigationToolbar(
self.canvas, parent=self
) # type: ignore[no-untyped-call]
self.toolbar = NapariNavigationToolbar(self.canvas, parent=self)
self._replace_toolbar_icons()
# callback to update when napari theme changed
# TODO: this isn't working completely (see issue #140)
@@ -97,7 +95,7 @@ def add_single_axes(self) -> None:
# Sets axes.* style.
# Does not set any text styling set by axes.* keys
with mplstyle.context(self.mpl_style_sheet_path):
self.axes = self.figure.subplots()
self.axes = self.figure.add_subplot()

def _on_napari_theme_changed(self) -> None:
"""
@@ -184,7 +182,7 @@ class NapariMPLWidget(BaseNapariMPLWidget):
#: Number of layers taken as input
n_layers_input = Interval(None, None)
#: Type of layer taken as input
input_layer_types: Tuple[napari.layers.Layer, ...] = (napari.layers.Layer,)
input_layer_types: tuple[napari.layers.Layer, ...] = (napari.layers.Layer,)

def __init__(
self,
@@ -193,7 +191,7 @@ def __init__(
):
super().__init__(napari_viewer=napari_viewer, parent=parent)
self._setup_callbacks()
self.layers: List[napari.layers.Layer] = []
self.layers: list[napari.layers.Layer] = []

helper_text = self.n_layers_input._helper_text
if helper_text is not None:
@@ -260,7 +258,7 @@ def _draw(self) -> None:
isinstance(layer, self.input_layer_types) for layer in self.layers
):
self.draw()
self.canvas.draw()
self.canvas.draw() # type: ignore[no-untyped-call]

def clear(self) -> None:
"""
@@ -309,8 +307,8 @@ def clear(self) -> None:
class NapariNavigationToolbar(NavigationToolbar2QT):
"""Custom Toolbar style for Napari."""

def __init__(self, *args, **kwargs): # type: ignore[no-untyped-def]
super().__init__(*args, **kwargs)
def __init__(self, *args, **kwargs) -> None: # type: ignore[no-untyped-def]
super().__init__(*args, **kwargs) # type: ignore[no-untyped-call]
self.setIconSize(
from_napari_css_get_size_of(
"QtViewerPushButton", fallback=(28, 28)
@@ -319,7 +317,7 @@ def __init__(self, *args, **kwargs): # type: ignore[no-untyped-def]

def _update_buttons_checked(self) -> None:
"""Update toggle tool icons when selected/unselected."""
super()._update_buttons_checked()
super()._update_buttons_checked() # type: ignore[no-untyped-call]
icon_dir = self.parentWidget()._get_path_to_icon()

# changes pan/zoom icons depending on state (checked or not)
36 changes: 32 additions & 4 deletions src/napari_matplotlib/histogram.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from typing import Any, List, Optional, Tuple
from typing import Any, Optional, cast

import napari
import numpy as np
import numpy.typing as npt
from matplotlib.container import BarContainer
from qtpy.QtWidgets import QComboBox, QLabel, QVBoxLayout, QWidget

from .base import SingleAxesWidget
@@ -107,7 +108,7 @@ def _set_axis_keys(self, x_axis_key: str) -> None:
self._x_axis_key = x_axis_key
self._draw()

def _get_valid_axis_keys(self) -> List[str]:
def _get_valid_axis_keys(self) -> list[str]:
"""
Get the valid axis keys from the layer FeatureTable.
@@ -122,7 +123,7 @@ def _get_valid_axis_keys(self) -> List[str]:
else:
return self.layers[0].features.keys()

def _get_data(self) -> Tuple[Optional[npt.NDArray[Any]], str]:
def _get_data(self) -> tuple[Optional[npt.NDArray[Any]], str]:
"""Get the plot data.
Returns
@@ -162,12 +163,39 @@ def on_update_layers(self) -> None:

def draw(self) -> None:
"""Clear the axes and histogram the currently selected layer/slice."""
# get the colormap from the layer depending on its type
if isinstance(self.layers[0], napari.layers.Points):
colormap = self.layers[0].face_colormap
self.layers[0].face_color = self.x_axis_key
elif isinstance(self.layers[0], napari.layers.Vectors):
colormap = self.layers[0].edge_colormap
self.layers[0].edge_color = self.x_axis_key
else:
colormap = None

# apply new colors to the layer
self.viewer.layers[self.layers[0].name].refresh_colors(True)
self.viewer.layers[self.layers[0].name].refresh()

# Draw the histogram
data, x_axis_name = self._get_data()

if data is None:
return

self.axes.hist(data, bins=50, edgecolor="white", linewidth=0.3)
_, bins, patches = self.axes.hist(
data, bins=50, edgecolor="white", linewidth=0.3
)
patches = cast(BarContainer, patches)

# recolor the histogram plot
if colormap is not None:
self.bins_norm = (bins - bins.min()) / (bins.max() - bins.min())
colors = colormap.map(self.bins_norm)

# Set histogram style:
for idx, patch in enumerate(patches):
patch.set_facecolor(colors[idx])

# set ax labels
self.axes.set_xlabel(x_axis_name)
12 changes: 6 additions & 6 deletions src/napari_matplotlib/scatter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, List, Optional, Tuple, Union
from typing import Any, Optional, Union

import napari
import numpy.typing as npt
@@ -40,7 +40,7 @@ def draw(self) -> None:
self.axes.set_xlabel(x_axis_name)
self.axes.set_ylabel(y_axis_name)

def _get_data(self) -> Tuple[npt.NDArray[Any], npt.NDArray[Any], str, str]:
def _get_data(self) -> tuple[npt.NDArray[Any], npt.NDArray[Any], str, str]:
"""
Get the plot data.
@@ -67,7 +67,7 @@ class ScatterWidget(ScatterBaseWidget):
n_layers_input = Interval(2, 2)
input_layer_types = (napari.layers.Image,)

def _get_data(self) -> Tuple[npt.NDArray[Any], npt.NDArray[Any], str, str]:
def _get_data(self) -> tuple[npt.NDArray[Any], npt.NDArray[Any], str, str]:
"""
Get the plot data.
@@ -106,7 +106,7 @@ def __init__(

self.layout().addLayout(QVBoxLayout())

self._selectors: Dict[str, QComboBox] = {}
self._selectors: dict[str, QComboBox] = {}
for dim in ["x", "y"]:
self._selectors[dim] = QComboBox()
# Re-draw when combo boxes are updated
@@ -147,7 +147,7 @@ def y_axis_key(self, key: str) -> None:
self._selectors["y"].setCurrentText(key)
self._draw()

def _get_valid_axis_keys(self) -> List[str]:
def _get_valid_axis_keys(self) -> list[str]:
"""
Get the valid axis keys from the layer FeatureTable.
@@ -186,7 +186,7 @@ def draw(self) -> None:
if self._ready_to_scatter():
super().draw()

def _get_data(self) -> Tuple[npt.NDArray[Any], npt.NDArray[Any], str, str]:
def _get_data(self) -> tuple[npt.NDArray[Any], npt.NDArray[Any], str, str]:
"""
Get the plot data from the ``features`` attribute of the first
selected layer.
6 changes: 3 additions & 3 deletions src/napari_matplotlib/slice.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, List, Optional, Tuple
from typing import Any, Optional

import matplotlib.ticker as mticker
import napari
@@ -99,7 +99,7 @@ def current_dim_index(self) -> int:
return self._dim_names.index(self.current_dim_name)

@property
def _dim_names(self) -> List[str]:
def _dim_names(self) -> list[str]:
"""
List of dimension names. This is a property as it varies depending on the
dimensionality of the currently selected data.
@@ -111,7 +111,7 @@ def _dim_names(self) -> List[str]:
else:
raise RuntimeError("Don't know how to handle ndim != 2 or 3")

def _get_xy(self) -> Tuple[npt.NDArray[Any], npt.NDArray[Any]]:
def _get_xy(self) -> tuple[npt.NDArray[Any], npt.NDArray[Any]]:
"""
Get data for plotting.
"""
Binary file modified src/napari_matplotlib/tests/baseline/test_custom_theme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/napari_matplotlib/tests/baseline/test_histogram_2D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/napari_matplotlib/tests/baseline/test_histogram_3D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/napari_matplotlib/tests/baseline/test_slice_2D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/napari_matplotlib/tests/baseline/test_slice_3D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/napari_matplotlib/tests/scatter/baseline/test_scatter_2D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/napari_matplotlib/tests/scatter/baseline/test_scatter_3D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/napari_matplotlib/tests/scatter/test_scatter_features.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from copy import deepcopy
from typing import Any, Dict, Tuple
from typing import Any

import numpy as np
import numpy.typing as npt
@@ -34,7 +34,7 @@ def test_features_scatter_widget_2D(


def make_labels_layer_with_features() -> (
Tuple[npt.NDArray[np.uint16], Dict[str, Any]]
tuple[npt.NDArray[np.uint16], dict[str, Any]]
):
label_image: npt.NDArray[np.uint16] = np.zeros((100, 100), dtype=np.uint16)
for label_value, start_index in enumerate([10, 30, 50], start=1):
Loading