Skip to main content

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')

Metadata

Release files for plot2svg 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plot2svg 0.0.4
File Size Uploaded
plot2svg-0.0.4.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plot2svg 0.0.4
File Interpreter ABI Platform
plot2svg-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 5.9 kB

Release files / plot2svg-0.0.4.tar.gz

Download URL plot2svg-0.0.4.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3dd49023558f468bfddb21f7d824c7613e6579f0bd616a075ef3654b60d56d04
BLAKE2b-256 checksum
How to use checksums
32ccb6e28493c50689b398161a8326e266b448a33ffef483ec2974ed697161f7
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / plot2svg-0.0.4-py3-none-any.whl

Download URL plot2svg-0.0.4-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfba29d6cb8b041079523b91922a447143a7a060cdc24180a0d5c0623dc31772
BLAKE2b-256 checksum
How to use checksums
026494569a9dce0c00e5dd80e3819183a786883460a565aed93d5ef1fe0126a2
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page