Skip to main content

A wrapper around matplotlib

Project description

GitlabCIPipeline GitlabCICoverage Appveyor Pypi Downloads

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,)
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.

The kwplot.multi_plot function is able to create line and bar plots with multiple lines/bars in a labeled axes using only a single function call. This can dramatically reduce the code size needed to perform simple plot visualizations as well as ensure that the code that produces the data is decoupled from the code that does the visualization.

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).

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.4.2.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

kwplot-0.4.2-py2.py3-none-any.whl (32.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: kwplot-0.4.2.tar.gz
  • Upload date:
  • Size: 31.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for kwplot-0.4.2.tar.gz
Algorithm Hash digest
SHA256 aab513e99391402ef1da83b92b2e251b2261653fe250fe0fc2d6d9dd7befddd3
MD5 08df2e2c9cfab67d8c90b166b09c4a42
BLAKE2b-256 62f25ef4002e0b52783c4a467be7cc66e620d1e815ec016856ab31d6ed9ad1c6

See more details on using hashes here.

File details

Details for the file kwplot-0.4.2-py2.py3-none-any.whl.

File metadata

  • Download URL: kwplot-0.4.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for kwplot-0.4.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9e7afd1eead4ca0055e66eb174c20695a19a48f6e059e4b4e4a99b27cbdcc358
MD5 66a37b0a4f96d00781227f7eb14b2580
BLAKE2b-256 c8b47956b84463b4ad1204f8e91cdd73d01672c38a57650871596200dac5fc5a

See more details on using hashes here.

Supported by

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