diff --git a/.copier-answers.yml b/.copier-answers.yml
index 87f96d4..185c203 100644
--- a/.copier-answers.yml
+++ b/.copier-answers.yml
@@ -1,7 +1,7 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 47497b5
_src_path: gh:scipp/copier_template
-description: Matplotlib replacement for Jupyter that uses WebGL via Pythreejs
+description: Matplotlib clone for Jupyter that uses WebGL via Pythreejs
max_python: '3.13'
min_python: '3.11'
namespace_package: ''
diff --git a/README.md b/README.md
index 8d6989b..24a6ab4 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
## About
-Matplotlib replacement for Jupyter that uses WebGL via Pythreejs
+Matplotlib clone for Jupyter that uses WebGL via Pythreejs
## Installation
diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico
new file mode 100644
index 0000000..31c6f22
Binary files /dev/null and b/docs/_static/favicon.ico differ
diff --git a/docs/_static/logo-dark.svg b/docs/_static/logo-dark.svg
new file mode 100644
index 0000000..3848b20
--- /dev/null
+++ b/docs/_static/logo-dark.svg
@@ -0,0 +1,70 @@
+
+
+
+
diff --git a/docs/_static/logo.svg b/docs/_static/logo.svg
new file mode 100644
index 0000000..f7bf6e6
--- /dev/null
+++ b/docs/_static/logo.svg
@@ -0,0 +1,70 @@
+
+
+
+
diff --git a/docs/index.md b/docs/index.md
index 208ef8e..cefe54c 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -24,7 +24,7 @@
# {transparent}`Matplotgl`
- Matplotlib replacement for Jupyter that uses WebGL via Pythreejs
+ Matplotlib clone for Jupyter that uses WebGL via Pythreejs
diff --git a/docs/user-guide/imshow.ipynb b/docs/user-guide/imshow.ipynb
index 31cfdcb..fe50342 100644
--- a/docs/user-guide/imshow.ipynb
+++ b/docs/user-guide/imshow.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "394c0bcc-4177-4083-abbb-9f829ab60a01",
+ "id": "0",
"metadata": {},
"source": [
"# Imshow"
@@ -11,7 +11,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7b97da73-c403-48e6-a9a4-d86b8452eca2",
+ "id": "1",
"metadata": {},
"outputs": [],
"source": [
@@ -22,7 +22,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "650ad4ba-b117-4295-a4d0-55a3df249b1c",
+ "id": "2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/docs/user-guide/plot.ipynb b/docs/user-guide/plot.ipynb
index 78bdd48..d1d0976 100644
--- a/docs/user-guide/plot.ipynb
+++ b/docs/user-guide/plot.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d228c316-3700-44b4-b457-218454da891d",
+ "id": "0",
"metadata": {},
"source": [
"# Plot"
@@ -11,7 +11,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "710d60a6-0166-44b5-8460-0e46eff525fa",
+ "id": "1",
"metadata": {},
"outputs": [],
"source": [
@@ -22,7 +22,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0bcb7406-4eb8-45af-971e-36c7af397de4",
+ "id": "2",
"metadata": {},
"outputs": [],
"source": [
@@ -42,7 +42,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5c0de3de-4ce7-4882-9c0d-db6cb189bce0",
+ "id": "3",
"metadata": {},
"outputs": [],
"source": [
diff --git a/docs/user-guide/scatter.ipynb b/docs/user-guide/scatter.ipynb
index 76487f8..ec90b57 100644
--- a/docs/user-guide/scatter.ipynb
+++ b/docs/user-guide/scatter.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "935f17d3-eae3-41e5-8258-8165cda406bb",
+ "id": "0",
"metadata": {},
"source": [
"# Scatter"
@@ -11,7 +11,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9f36776c-0c6b-4d3b-8d76-86961aa11d16",
+ "id": "1",
"metadata": {},
"outputs": [],
"source": [
@@ -22,7 +22,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "05d54f24-7298-4ec3-befd-85ebaff9d1a6",
+ "id": "2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/pyproject.toml b/pyproject.toml
index ea8eead..278320d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "matplotgl"
-description = "Matplotlib replacement for Jupyter that uses WebGL via Pythreejs"
+description = "Matplotlib clone for Jupyter that uses WebGL via Pythreejs"
authors = [{ name = "Scipp contributors" }]
license = "BSD-3-Clause"
license-files = ["LICENSE"]
@@ -32,6 +32,7 @@ requires-python = ">=3.11"
dependencies = [
"matplotlib",
"pythreejs",
+ "anywidget",
]
dynamic = ["version"]
@@ -60,7 +61,7 @@ addopts = """
testpaths = "tests"
filterwarnings = [
"error",
-]
+ 'ignore:\n Sentinel is not a public part of the traitlets API:DeprecationWarning',]
[tool.ruff]
line-length = 88
diff --git a/requirements/base.in b/requirements/base.in
index a3923cb..f862369 100644
--- a/requirements/base.in
+++ b/requirements/base.in
@@ -4,3 +4,4 @@
# The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY!
matplotlib
pythreejs
+anywidget
diff --git a/requirements/base.txt b/requirements/base.txt
index 6e74756..09adb19 100644
--- a/requirements/base.txt
+++ b/requirements/base.txt
@@ -1,10 +1,12 @@
-# SHA1:04ba1dfd0c00e2f352f80789e53cd5ef22ea5d76
+# SHA1:2c258b7b4a1cf8f84c688edac6f53735d3ea39b8
#
# This file was generated by pip-compile-multi.
# To update, run:
#
# requirements upgrade
#
+anywidget==0.9.18
+ # via -r base.in
asttokens==3.0.0
# via stack-data
comm==0.2.3
@@ -27,6 +29,7 @@ ipython-pygments-lexers==1.1.1
# via ipython
ipywidgets==8.1.7
# via
+ # anywidget
# ipydatawidgets
# pythreejs
jedi==0.19.2
@@ -55,6 +58,8 @@ pillow==12.0.0
# via matplotlib
prompt-toolkit==3.0.52
# via ipython
+psygnal==0.15.0
+ # via anywidget
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.3
@@ -83,7 +88,9 @@ traitlets==5.14.3
traittypes==0.2.3
# via ipydatawidgets
typing-extensions==4.15.0
- # via ipython
+ # via
+ # anywidget
+ # ipython
wcwidth==0.2.14
# via prompt-toolkit
widgetsnbextension==4.0.14
diff --git a/requirements/make_base.py b/requirements/make_base.py
index 4c004af..2cda547 100644
--- a/requirements/make_base.py
+++ b/requirements/make_base.py
@@ -70,7 +70,9 @@ def as_nightly(repo: str) -> str:
nightly = tuple(args.nightly.split(",") if args.nightly else [])
-nightly_dependencies = [dep for dep in dependencies + test_dependencies if not dep.startswith(nightly)]
+nightly_dependencies = [
+ dep for dep in dependencies + test_dependencies if not dep.startswith(nightly)
+]
nightly_dependencies += [as_nightly(arg) for arg in nightly]
write_dependencies("nightly", nightly_dependencies)
diff --git a/requirements/nightly.in b/requirements/nightly.in
index 7738c80..ba91b3f 100644
--- a/requirements/nightly.in
+++ b/requirements/nightly.in
@@ -3,4 +3,5 @@
# The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY!
matplotlib
pythreejs
+anywidget
pytest
diff --git a/requirements/nightly.txt b/requirements/nightly.txt
index 8baa616..035afe3 100644
--- a/requirements/nightly.txt
+++ b/requirements/nightly.txt
@@ -1,10 +1,12 @@
-# SHA1:bd1b1a61cb415a83b0c4c4c36380945b04796f84
+# SHA1:d2cf1c994df2f0f7d49dbb832580621379e9d486
#
# This file was generated by pip-compile-multi.
# To update, run:
#
# requirements upgrade
#
+anywidget==0.9.18
+ # via -r nightly.in
asttokens==3.0.0
# via stack-data
comm==0.2.3
@@ -29,6 +31,7 @@ ipython-pygments-lexers==1.1.1
# via ipython
ipywidgets==8.1.7
# via
+ # anywidget
# ipydatawidgets
# pythreejs
jedi==0.19.2
@@ -61,6 +64,8 @@ pluggy==1.6.0
# via pytest
prompt-toolkit==3.0.52
# via ipython
+psygnal==0.15.0
+ # via anywidget
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.3
@@ -92,7 +97,9 @@ traitlets==5.14.3
traittypes==0.2.3
# via ipydatawidgets
typing-extensions==4.15.0
- # via ipython
+ # via
+ # anywidget
+ # ipython
wcwidth==0.2.14
# via prompt-toolkit
widgetsnbextension==4.0.14
diff --git a/src/matplotgl/axes.py b/src/matplotgl/axes.py
index e689448..6faf194 100644
--- a/src/matplotgl/axes.py
+++ b/src/matplotgl/axes.py
@@ -2,15 +2,14 @@
# Copyright (c) 2023 Matplotgl contributors (https://github.com/matplotgl)
import ipywidgets as ipw
+import numpy as np
import pythreejs as p3
from matplotlib.axes import Axes as MplAxes
-import numpy as np
-
-from .line import Line
-from .points import Points
from .image import Image
+from .line import Line
from .mesh import Mesh
+from .points import Points
from .utils import latex_to_html
from .widgets import ClickableHTML
@@ -23,6 +22,7 @@ def __init__(self, *, ax: MplAxes, figure=None) -> None:
self._ymin = 0.0
self._ymax = 1.0
self._fig = None
+ self._spine_linewidth = 1.0
self._ax = ax
self._artists = []
self.lines = []
@@ -136,7 +136,12 @@ def __init__(self, *, ax: MplAxes, figure=None) -> None:
)
self._margins["cursor"] = ipw.Label(
"(0.00, 0.00)",
- layout={"grid_area": "cursor", "padding": "0", "margin": "0"},
+ layout={
+ "grid_area": "cursor",
+ "padding": "0",
+ "margin": "0",
+ "width": "80px",
+ },
)
if figure is not None:
@@ -337,13 +342,14 @@ def _make_xticks(self):
bottom_string = (
f'