Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.1
rev: v0.14.10
hooks:
- id: ruff-format

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

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
rev: v1.19.1
hooks:
- id: mypy
additional_dependencies: [numpy, matplotlib]
- id: mypy
additional_dependencies: [numpy>=2.1, matplotlib]

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

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
[![Python Version](https://img.shields.io/pypi/pyversions/napari-matplotlib.svg?color=green)](https://python.org)
[![tests](https://github.com/matplotlib/napari-matplotlib/workflows/tests/badge.svg)](https://github.com/matplotlib/napari-matplotlib/actions)
[![codecov](https://codecov.io/gh/matplotlib/napari-matplotlib/branch/main/graph/badge.svg)](https://codecov.io/gh/matplotlib/napari-matplotlib)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/matplotlib/pytest-mpl/master.svg)](https://results.pre-commit.ci/latest/github/matplotlib/pytest-mpl/master)
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-matplotlib)](https://napari-hub.org/plugins/napari-matplotlib)
[![SPEC 0 — Minimum Supported Dependencies](https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038)](https://scientific-python.org/specs/spec-0000/)

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.

Documentation can be found at https://napari-matplotlib.github.io/
Expand All @@ -33,9 +34,7 @@ If you encounter any problems, please [file an issue] along with a detailed desc

[@napari]: https://github.com/napari
[BSD-3]: http://opensource.org/licenses/BSD-3-Clause

[file an issue]: https://github.com/dstansby/napari-matplotlib/issues

[napari]: https://github.com/napari/napari
[tox]: https://tox.readthedocs.io/en/latest/
[pip]: https://pypi.org/project/pip/
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ filterwarnings = [
"ignore:`np.bool8` is a deprecated alias for `np.bool_`:DeprecationWarning",
# Coming from pydantic via napari
"ignore:Pickle, copy, and deepcopy support will be removed from itertools in Python 3.14.:DeprecationWarning",
# Until we stop supporting older numpy versions (<2.1)
"ignore:(?s).*`newshape` keyword argument is deprecated.*$:DeprecationWarning",
]
qt_api = "pyqt6"
addopts = [
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ packages = find:
install_requires =
matplotlib
napari>=0.5
numpy>=1.23
numpy>=2
tinycss2
python_requires = >=3.11
include_package_data = True
Expand All @@ -56,6 +56,7 @@ docs =
sphinx-gallery
testing =
napari[pyqt6_experimental]>=0.4.18
numpy>=2.1
pooch
pyqt6
pytest
Expand Down
2 changes: 1 addition & 1 deletion src/napari_matplotlib/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def fig_to_array(fig: Figure) -> npt.NDArray[np.uint8]:
io_buf.seek(0)
img_arr: npt.NDArray[np.uint8] = np.reshape(
np.frombuffer(io_buf.getvalue(), dtype=np.uint8),
newshape=(int(fig.bbox.bounds[3]), int(fig.bbox.bounds[2]), -1),
shape=(int(fig.bbox.bounds[3]), int(fig.bbox.bounds[2]), -1),
)
return img_arr

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{310,311,312}
envlist = py{311,312,313}
isolated_build = true

[gh-actions]
Expand Down