Skip to main content

Create SVG files from VMobject and VGroup

Project description

manim-mobject-svg

Create SVG files from VMobject and VGroup.

Install: pip install manim-mobject-svg

Here's an example of how to use this plugin:

from manim import *
from manim_mobject_svg import *

a = Square(color=BLUE)
a.to_svg("square.svg")

This should create a file square.svg in the current directory and return the path to the file. The output should look like this:

svg square manim

It's also possible to create a SVG file for VGroup.

from manim import *
from manim_mobject_svg import *

a = Square(color=BLUE)
b = Circle(color=RED)
c = VGroup(a, b)
c.to_svg("group.svg")

It'll create a SVG file like this:

svg vgroup manim

Parameters for to_svg()

to_svg() takes the following parameters:

  • path: Path to the SVG file to be created. If not specified, it'll create a temporary file and return the path to the file.
  • crop: Crop the SVG file to the bounding box of the VMobject. Default: True
  • padding: Padding around the VMobject. Default: 0.5

This method returns the path to the SVG file.

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

manim_mobject_svg-0.4.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

manim_mobject_svg-0.4.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file manim_mobject_svg-0.4.0.tar.gz.

File metadata

  • Download URL: manim_mobject_svg-0.4.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.16 Linux/5.15.0-1038-azure

File hashes

Hashes for manim_mobject_svg-0.4.0.tar.gz
Algorithm Hash digest
SHA256 7fc92635022f70d8157d1ca1e4fb19bb1754fb9c175bdb91c41a8ed17d6d74c4
MD5 d42871055dbcae410eb9b96eee092b9d
BLAKE2b-256 47c0ef723eb3ef018f688cde2d8899e04b0f941e28e1f87d5531dc31332d7619

See more details on using hashes here.

File details

Details for the file manim_mobject_svg-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: manim_mobject_svg-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.16 Linux/5.15.0-1038-azure

File hashes

Hashes for manim_mobject_svg-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee98323c560cc54915ea2ca1641a46dc37d6d9b672b9c3a3ebb16b2b844a23c4
MD5 254889a24fdfa30389eb142cbe3caa7c
BLAKE2b-256 b8af68f4ef6e663e67f473fbd51e306733c15cf4def3a44dab1ff3762879a9df

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page