Skip to main content

Extract matplotlib plots components

Project description

matplotlib-extract

This package is useful to create dynamic presentations where elements of a plot appear one by one. To do so, the elements are exported to seperate files.

Install with

pip install matplotlib-extract

Usage

import matplotlib.pyplot as plt
from matplotlib_extract import extract_elements

import numpy as np

x = np.linspace(0, 2*np.pi)
y1 = 2*x
y2 = 6 + 2*np.sin(x)

plt.plot(x, y1, label="line1")
plt.plot(x, y2, label="line2")
plt.legend()

extract_elements()

plt.show()

Running this script will create files for the lines, the axis and the legend.

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

matplotlib_extract-0.1.2.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

matplotlib_extract-0.1.2-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

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