A few conveniences for working with matplotlib.
Latest release 20220918:
- New FigureSize class.
- axes(): accept a FigureSize for figure.
Function axes(figure=None, ax=None, **fig_kw) -> matplotlib.axes._axes.Axes
Return a set of Axes.
Parameters:
figure: optionalFigurefrom which to obtain theAxesor an(x,y)figure size or an(x,y,dpi)figure sizeax: optionalAxesor axes index
If ax is already an Axes it is returned unchanged.
Otherwise ax should be the index of a set of axes,
default 0.
If figure is a Figure, ax is used to select one of its
sets of axes.
Otherwise a Figure is created and a set of axes is selected.
The default figure size comes from the FigureSize defaults.
The figure positional parameter may be supplied
as a 2-tuple (fig_dx,fig_dy) to override the default size
or as a 3-tuple (fig_dx,fig_dy,dpi) to override the default size and dpi,
or as a FigureSze.
Class FigureSize
Specifications for a Figure's dimensions.
Function print_figure(figure_or_ax, imgformat=None, file=None)
Print figure_or_ax to a file.
Parameters:
figure_or_ax: amatplotlib.figure.Figureor an object with a.figureattribute such as a set ofAxesimgformat: optional output format; if omitted use'sixel'iffileis a terminal, otherwise'png'file: the output file, defaultsys.stdout
Function remove_decorations(figure_or_ax: Union[matplotlib.figure.Figure, matplotlib.axes._axes.Axes])
Remove all decorations from a Figure or Axes instance,
intended for making bare plots such as a tile in GUI.
Presently this removes:
- axes markings and legend from each axis
- the padding from all the figure subplots
Function save_figure(figure_or_ax, imgpath: str, force=False)
Save a Figure to the file imgpath.
Parameters:
figure_or_ax: amatplotlib.figure.Figureor an object with a.figureattribute such as a set ofAxesimgpath: the filesystem path to which to save the imageforce: optional flag, defaultFalse: if true theimgpathwill be written to even if it exists
Function saved_figure(figure_or_ax, dir=None, ext=None)
Context manager to save a Figure to a file and yield the file path.
Parameters:
figure_or_ax: amatplotlib.figure.Figureor an object with a.figureattribute such as a set ofAxesdir: passed totempfile.TemporaryDirectoryext: optional file extension, default'png'
Release Log
Release 20220918:
- New FigureSize class.
- axes(): accept a FigureSize for figure.
Release 20220805: Initial PyPI release.
Metadata
Release files for cs-mplutils 20220918
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 |
|---|---|---|---|---|
| cs.mplutils-20220918.tar.gz | 4.6 kB | Without provenance | Details for cs.mplutils-20220918.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cs.mplutils-20220918-py3-none-any.whl | Python 3 | none | any | Details for cs.mplutils-20220918-py3-none-any.whl |
Total release size: 9.5 kB
Release files / cs.mplutils-20220918.tar.gz
| Download URL | cs.mplutils-20220918.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5b08bc9c64c6b0518e87f1b7cc5dc21da59d4d04d65b1f20e744187c34bd42c
|
|
BLAKE2b-256 checksum How to use checksums |
4325c8093add5eac6253b0f5362f600a9442b4d440cf2a64aa3a205bdbbf16d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / cs.mplutils-20220918-py3-none-any.whl
| Download URL | cs.mplutils-20220918-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
793dae3cfe29bc199ba89e38310b5aa4f203de3c9359c7378abd42c0a0653499
|
|
BLAKE2b-256 checksum How to use checksums |
0dd4ac068d8a48fb8c136f63af55a071ead5e66ccdd8a6e14665a8970fbcadba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for cs-mplutils 20220918
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.