SVG-pltmarker
Convert SVG graphics into Matplotlib marker paths.
Install
pip install svg-pltmarker
For development:
uv sync --dev
Usage
import matplotlib.pyplot as plt
import numpy as np
from svg_pltmarker import get_marker_from_svg
marker = get_marker_from_svg(
url="https://upload.wikimedia.org/wikipedia/commons/8/84/Matplotlib_icon.svg"
)
fig, ax = plt.subplots(figsize=(6, 6))
ax.set_aspect("equal")
ax.set_axis_off()
x, y = np.meshgrid(np.linspace(0, 2, 11), np.linspace(0, 2, 11))
plt.scatter(x, y, marker=marker, s=2500, color="None", edgecolors="black")
plt.show()
Project links
Dependencies
- Python >= 3.10
- matplotlib >= 3.6.0
- numpy >= 1.22.0
- pydantic >= 2.0.0
Development
# Format code
uv run ruff format .
# Lint
uv run ruff check .
# Type check
uv run ty check
# Tests
uv run pytest
Equivalent targets are also available in Makefile (make format, make lint, make typecheck, make test).
See CONTRIBUTING.md for contribution workflow details.
Release files for svg_pltmarker 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| svg_pltmarker-1.1.0.tar.gz | 16.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| svg_pltmarker-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.1 kB
Release files / svg_pltmarker-1.1.0.tar.gz
| Download URL | svg_pltmarker-1.1.0.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3373006b8a89b6ed30b2e25f825ef459cb730e93516a4a785d780be2a0171826
|
|
BLAKE2b-256 checksum How to use checksums |
10b577a7e39b8d052ed86b2465f46bd0836db3d63aa1499e6ce04cfc03da1201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / svg_pltmarker-1.1.0-py3-none-any.whl
| Download URL | svg_pltmarker-1.1.0-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b794002492468510cb95a0d0f3e8a66fa1ed02ccbdd2e3d6e71a59e36b2e335d
|
|
BLAKE2b-256 checksum How to use checksums |
95624e248ac78fc60023c7ee34ba22ac85a51ab55c6d8230e2ff8d60dee11e8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|