The kwplot module
Project description
ReadTheDocs |
|
Gitlab (main) |
|
Github (mirror) |
|
Pypi |
The kwplot module is a wrapper around matplotlib and can be used for visualizing algorithm results.
The top-level API is:
from .auto_backends import (autompl, autoplt, set_mpl_backend,)
from .draw_conv import (make_conv_images, plot_convolutional_features,)
from .mpl_3d import (plot_surface3d,)
from .mpl_color import (Color,)
from .mpl_core import (distinct_colors, distinct_markers, ensure_fnum, figure,
imshow, legend, next_fnum, set_figtitle,
show_if_requested,)
from .mpl_draw import (draw_boxes, draw_boxes_on_image, draw_clf_on_image,
draw_line_segments, draw_text_on_image, plot_matrix, draw_points,)
from .mpl_make import (make_heatmask, make_orimask, make_vector_field,)
from .mpl_multiplot import (multi_plot,)
from .mpl_plotnums import (PlotNums,)
One of the key features is the kwplot.autompl function, which is able to somewhat intelligently set the notorious matplotlib backend. By default it will attempt to use PyQt5 if it is installed and a DISPLAY is available. Otherwise it will ensure the backend is set to Agg. For convinience, the functions: kwplot.autoplt and kwplot.autosns also execute this auto-backend behavior, but return the pyplot and seaborn module, respectively. It is recommended to call one of these functions before any use of pyplot due to pyplot’s import-time side effects (note: pre-importing most other matplotlib modules is ok).
The kwplot.imshow and kwplot.figure functions are extensions of the matplotlib versions with slightly extended interfaces (again to help reduce the density of visualization code in research scripts). The kwplot.PlotNums helps manage subplots locations, especially when you are developing / reordering them.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kwplot-0.5.2.tar.gz
.
File metadata
- Download URL: kwplot-0.5.2.tar.gz
- Upload date:
- Size: 87.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7114cdae9c8a6830ddd668ce668b7cda3fd8220937d346131f7853ff05593cf0 |
|
MD5 | 91cab0b2cdbbf6aa4d49ad5054c5c85c |
|
BLAKE2b-256 | e4c2e3c32b6dd7c9caabb19120161f6261d9d168071e879a646cfb747d4fd2b0 |
File details
Details for the file kwplot-0.5.2-py3-none-any.whl
.
File metadata
- Download URL: kwplot-0.5.2-py3-none-any.whl
- Upload date:
- Size: 89.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f21b5ad12901dd4ebcbda64e2d81803c7311c5e8dbe87b506a9c4129044b03f5 |
|
MD5 | 01337b7c59eeb52e23c79fa95f937643 |
|
BLAKE2b-256 | 9de7dd38ac7ce83543e27acd5893eb249d066bc67f21adb7b237d85fe6fa779d |