A plotting library for making horizontal bar charts.
Project description
Simple bars, four features
Introduction
Catbars is a Python library for making horizontal bar charts.
Built on top of Matplotlib (barh), Catbars enables programmers to visualize efficiently labelled observations which can be numerically ordered.
As a bit of data science logic is embedded in Catbars, observations can be ordered on demand and colors are inferred from labels. You can override this automatic behaviour by specifying a dictionary mapping categories to colors. A default color will be used for the residual categories.
All you have to do is to call the Bars constructor with the right keyword arguments (almost everything can be fine-tuned through kwargs).
A special attention has been paid to the layout management. Catbars will do its best to make room for your data (especially for the long labels on the left or on the right) under the constraint of the figure size (the classic figsize/dpi combination) and the font sizes (data font, main title font, axis title font).
Catbars will automatically render the figure in Jupyter notebooks (implicit _repr_png_() call). The figure can be saved on disk in png format (by specifying the keyword argument file_name or by calling print_png() on the returned object) or in pdf format (print_pdf()).
Catbars doesn’t support grouped bar charts and stacked bar charts.
License
MIT
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 catbars-1.0.1.tar.gz
.
File metadata
- Download URL: catbars-1.0.1.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a65f3a884171569eb5e4a448aadb1eeb7420c92e101adc1ee09432d94ce4002 |
|
MD5 | 3bd7806c187bcb97b151532140399650 |
|
BLAKE2b-256 | 1fa033b06ef9a5a2f853176bb475ae4d0c72b3f98fd421bcd02ccfc3af739060 |
File details
Details for the file catbars-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: catbars-1.0.1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b263dd18f867b474599c0cf6293beaf96957d5da637c5a9c7726a0d4f107e45 |
|
MD5 | 832d07a7958f0af006299185570ba9ea |
|
BLAKE2b-256 | a0d469d1595d8a053a3bf600097a8243d6660abff30ef4f1f4dd116f8230c42a |