Skip to main content

The kwplot module

Project description

GitlabCIPipeline GitlabCICoverage Appveyor Pypi Downloads ReadTheDocs

ReadTheDocs

https://kwplot.readthedocs.io/en/latest/

Gitlab (main)

https://gitlab.kitware.com/computer-vision/kwplot

Github (mirror)

https://github.com/Kitware/kwplot

Pypi

https://pypi.org/project/kwplot

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kwplot-0.5.4.tar.gz (97.0 kB view details)

Uploaded Source

Built Distribution

kwplot-0.5.4-py3-none-any.whl (99.4 kB view details)

Uploaded Python 3

File details

Details for the file kwplot-0.5.4.tar.gz.

File metadata

  • Download URL: kwplot-0.5.4.tar.gz
  • Upload date:
  • Size: 97.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for kwplot-0.5.4.tar.gz
Algorithm Hash digest
SHA256 f01d1d4ba65005a82c6e72647dc6eb0c40ea4a1d85a0241264f115b45faefa19
MD5 7de077cd3fe887300fec94cb701889b5
BLAKE2b-256 86ae2c462654113ad2c780e4afef35388922124e6598142db21af3ddbc545e65

See more details on using hashes here.

File details

Details for the file kwplot-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: kwplot-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 99.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for kwplot-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b380dec6229a0ce2b3b3679009e851cf5e1ad2ec20b609b943313c1cb0d82faa
MD5 ab36433a3599447cd868fb6432c8e0db
BLAKE2b-256 1c364a4a4f0bacee819de776089a7085d4ea549cbd7f6b325d39d567c3d4a1c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page