A few conveniences for working with matplotlib.
Latest release 20220805: Initial PyPI release.
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 DEFAULT_FIGURE_SIZE ((10, 7))
and the default dpi comes from DEFAULT_FIGURE_DPI (100).
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.
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 20220805: Initial PyPI release.
Release files for cs-mplutils 20220805
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cs.mplutils-20220805.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cs.mplutils-20220805-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.0 kB
Release files / cs.mplutils-20220805.tar.gz
| Download URL | cs.mplutils-20220805.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c477d26fa8c9596d392b968b1a257e9a805471de6a30f73a76f1f25fa241b69d
|
|
BLAKE2b-256 checksum How to use checksums |
f2dfa3ce54da91448f0afa0156e6d5e2fd366f4ebb64ffc03df24b06bd2661f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.1 readme-renderer/30.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.3.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.13
|
Release files / cs.mplutils-20220805-py3-none-any.whl
| Download URL | cs.mplutils-20220805-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43e43f2ef9bdc003d30207c034c9026c21b481407320510ed968ef1f8c363994
|
|
BLAKE2b-256 checksum How to use checksums |
77b46c7d06274d4c94058717407754f586a0c1b1680acffea473f9e9fc582ffc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.1 readme-renderer/30.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.3.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.13
|