ficus
About
Ficus provides a context manager for matplotlib figures. It finds particular utility in jupyter notebooks, where the user might prefer that figures are not automatically displayed but still wants the option to embed them inline – such behavior can be accomplished with:
%config InlineBackend.close_figures = False
However, the user is now responsible for making new Figure objects and closing them, which is a pain. The ficus context manager takes care of this boilerplate of opening, showing, saving, and closing figures for you.
Example
Some very basic usage:
from ficus import FigureManager
import numpy as np
X = np.arange(0, 10, .1)
Y = np.exp(X)
with FigureManager(filename='myplot.png', show=True) as (fig, ax):
ax.plot(X, Y)
ax.set_title('The Exponential Function')
FigureManager uses the pyplot.subplots(..) to generate its axes. Thus, you can specify rows and columns and get an array of Axes objects:
with FigureManager(show=True, nrows=3, ncols=4) as (fig, ax_mat):
for i, row in enumerate(ax_mat):
for j, ax in enumerate(row):
ax.plot(X, X**(i+j))
ax.set_title(r'$y = x^{0}$'.format(i+j), fontsize=14)
In fact, you can pass any keyword arguments you’d like to subplots:
with FigureManager(filename='myplot.png', show=True, figsize=(12,8)) as (fig, ax):
ax.plot(X, Y)
Take a look at the examples to see it being used in a jupyter notebook.
Metadata
Release files for ficus 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ficus-0.7.1.tar.gz | 4.3 kB | Without provenance | Details for ficus-0.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ficus-0.7.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for ficus-0.7.1-py2.py3-none-any.whl |
Total release size: 8.6 kB
Release files / ficus-0.7.1.tar.gz
| Download URL | ficus-0.7.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12ef1e86b471ca54736e60963b8311f9b74bfb6c3f9233251ee850f2db4d51c3
|
|
BLAKE2b-256 checksum How to use checksums |
64ef0185851e5f4514284e8f1192cf137fb3125cb241d60ba25640b652787fbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.3
|
Release files / ficus-0.7.1-py2.py3-none-any.whl
| Download URL | ficus-0.7.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
57c37d70b08f14cdcca7d719683348d07be9b601a8fddbd06f2adc23a00bd10f
|
|
BLAKE2b-256 checksum How to use checksums |
169b2e072b659f6bec6251efdbce324014dbf4f8b15df882a44732de732309c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.3
|
Security for ficus 0.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.