Skip to main content

Create SVG files from VMobject and VGroup in Manim

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.5.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: manim_mobject_svg-0.5.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/6.2.0-1018-azure

File hashes

Hashes for manim_mobject_svg-0.5.0.tar.gz
Algorithm Hash digest
SHA256 f8a8c21917e30ad1798c6a48290c0c2787dcb976b7b59ceb3e4a75f7a2e97fd5
MD5 b653e3db17d4ca7e96beade431a06e82
BLAKE2b-256 bb0106838a75caf675b8c098152270437d173d4448b4ce4cde61e8c738535c36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: manim_mobject_svg-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/6.2.0-1018-azure

File hashes

Hashes for manim_mobject_svg-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f6403d0cb528a98f2c0678b3733edf7f24585b5f4a821baf9186162c1196d69
MD5 22b214b008843a764012cbc643e4be99
BLAKE2b-256 ee17c4a230900c5c130244bda851ed2711d5fc5507bdd36a775e73e8c40a9afe

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