A simple plot tool to generate small SVG files
Project description
plot2svg
I was using some other tools to plot and save to .SVG file, And I found the files are too big.
So I make this package myself to generate SVG graphs with small file size.
For example, this package plot a bar which is 0.6 KB, compared to other tools plot the same bar which is 40 KB
install
pip install plot2svg
usage
plot a bar
from plot2svg import Bar
data = list(range(25))
view = Bar(width=500, height=300, color="red", data=data)
svg_context = view.get_svg_context()
print(svg_context)
view.save_svg('data_bar.svg')
plot texts
from plot2svg import Text
text = '''test
测试
换行
plot2svg is light'''
view = Text(width=500, height=300, color="red", data=text)
svg_context = view.get_svg_context()
print(svg_context)
view.save_svg('data_text.svg')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 plot2svg-0.0.4.tar.gz.
File metadata
- Download URL: plot2svg-0.0.4.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dd49023558f468bfddb21f7d824c7613e6579f0bd616a075ef3654b60d56d04
|
|
| MD5 |
1cb9e3f25690eab00dcffc5d3d7f5690
|
|
| BLAKE2b-256 |
32ccb6e28493c50689b398161a8326e266b448a33ffef483ec2974ed697161f7
|
File details
Details for the file plot2svg-0.0.4-py3-none-any.whl.
File metadata
- Download URL: plot2svg-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfba29d6cb8b041079523b91922a447143a7a060cdc24180a0d5c0623dc31772
|
|
| MD5 |
31ada5db535c9cc4a4196e333edec5d6
|
|
| BLAKE2b-256 |
026494569a9dce0c00e5dd80e3819183a786883460a565aed93d5ef1fe0126a2
|