A library for generating Matplotlib markers from SVG files.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
svg_pltmarker-1.1.0.tar.gz
(16.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file svg_pltmarker-1.1.0.tar.gz.
File metadata
- Download URL: svg_pltmarker-1.1.0.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3373006b8a89b6ed30b2e25f825ef459cb730e93516a4a785d780be2a0171826
|
|
| MD5 |
a37f280f1781d01e13abf81893e74504
|
|
| BLAKE2b-256 |
10b577a7e39b8d052ed86b2465f46bd0836db3d63aa1499e6ce04cfc03da1201
|
File details
Details for the file svg_pltmarker-1.1.0-py3-none-any.whl.
File metadata
- Download URL: svg_pltmarker-1.1.0-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b794002492468510cb95a0d0f3e8a66fa1ed02ccbdd2e3d6e71a59e36b2e335d
|
|
| MD5 |
1c1eafbe86ef03a8c1ce6eda0f57c727
|
|
| BLAKE2b-256 |
95624e248ac78fc60023c7ee34ba22ac85a51ab55c6d8230e2ff8d60dee11e8d
|