svgpath2mpl
Parse SVG paths into matplotlib Path objects for plotting.
A path in SVG is defined by a ‘path’ element which contains a d="(path data)" attribute that contains moveto, line, curve (both cubic and quadratic Béziers), arc and closepath instructions. Matplotlib actually supports all of these instructions natively but doesn’t provide a parser or fully compatible API.
Based on:
svg_parse for matplotlib by Nicolas P. Rougier (BSD license).
svg.path by Lennart Regebro (MIT license).
This module adds the path commands missing from (1), including smooth curves and endpoint-parameterized elliptical arcs.
>>> from svgpath2mpl import parse_path
>>> parse_path('M 100 100 L 300 100')
Path(array([[ 100., 100.], [ 300., 100.]]), array([1, 2], dtype=uint8))
See the Jupyter Notebook gallery of examples.
Resources
See the SVG Specification.
License
BSD (3-Clause).
Metadata
Release files for svgpath2mpl 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| svgpath2mpl-1.0.0.tar.gz | 8.5 kB | Without provenance | Details for svgpath2mpl-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| svgpath2mpl-1.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for svgpath2mpl-1.0.0-py2.py3-none-any.whl |
Total release size: 16.3 kB
Release files / svgpath2mpl-1.0.0.tar.gz
| Download URL | svgpath2mpl-1.0.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73d0eb7cc106f05a1733cdc59ecd606423e04f9274923387d53b068e65a2f805
|
|
BLAKE2b-256 checksum How to use checksums |
c8e06589661323ebe6d15a1225fdc46123e594e958ee8b727dab1caf1ad4ddb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Release files / svgpath2mpl-1.0.0-py2.py3-none-any.whl
| Download URL | svgpath2mpl-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e6119b7b4338dbe193919541f6d7a9df2ceb41bf1cdcb138c7d62e79efe2651d
|
|
BLAKE2b-256 checksum How to use checksums |
f73a56c66bbf535483ea028895020da87d058377a8e18355f6e0e2dc1aeb2b59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Security for svgpath2mpl 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.