QB Styles
QB Styles is a python package with a light and a dark matplotlib style.
| Dark style | Light style |
|---|---|
How do I install QB Styles?
qbstyles is a Python package. To install it, simply run:
pip install qbstyles
How do I use QB Styles?
You can use the dark Matplotlib style theme in the following way:
from qbstyles import mpl_style
mpl_style(dark=True)
And to use the light Matplotlib style theme, you can do the following:
from qbstyles import mpl_style
mpl_style(dark=False)
How do I use QB Styles in Jupyter Notebooks?
⚠️ Please make sure you run
from qbstyles import mpl_styleandmpl_style()in different cells as shown below. See this issue for more details.
# first cell
from qbstyles import mpl_style
# second cell
mpl_style()
What chart types can use QB Styles?
- Line plots
- Scatter plots
- Bubble plots
- Bar charts
- Pie charts
- Histograms and distribution plots
- 3D surface plots
- Stream plots
- Polar plots
Can you show me a few examples?
To run the examples in example.ipynb, install the required packages using pip install -r requirements_notebook.txt in a Python virtual environment of your choice.
import matplotlib.pyplot as plt
from qbstyles import mpl_style
def plot(dark):
mpl_style(dark)
fig, axes = plt.subplots(2, 2, figsize=(15, 10))
# the following functions are defined in example.ipynb
line_plot(axes[0, 0])
scatter_plot(axes[0, 1])
distribution_plot(axes[1, 0])
ax = plt.subplot(2, 2, 4, projection='polar')
polar_plot(ax)
plot(dark=True)
plot(dark=False)
How do I create my own styles?
Have a look at the files qb-common.mplstyle, qb-dark.mplstyle and qb-light.mplstyle. They contain many elements that you may want to customise.
To do so, create a file similar to the above files at the root of your project, and apply it after the qbstyle as follows:
import matplotlib.pyplot as plt
from qbstyles import mpl_style
mpl_style()
plt.style.use('./your-style.mplstyle')
All of matplotlibrc's options can be found here.
What licence do you use?
QB Styles is licensed under the Apache 2.0 License.
Metadata
Release files for qbstyles 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qbstyles-0.1.4.tar.gz | 7.9 kB | Without provenance | Details for qbstyles-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qbstyles-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for qbstyles-0.1.4-py3-none-any.whl |
Total release size: 18.0 kB
Release files / qbstyles-0.1.4.tar.gz
| Download URL | qbstyles-0.1.4.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03bf00a6c03559cb2d62cbebef4c105989e9addd64df79980c373fb17dce6d80
|
|
BLAKE2b-256 checksum How to use checksums |
5665b0a2f4b8ba3a110276c7d74b1e901f7ae4046b11ea2d493471a2e1858c73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10
|
Release files / qbstyles-0.1.4-py3-none-any.whl
| Download URL | qbstyles-0.1.4-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30aa0cafdd1445c421298e295c1f85bb6c09185fee70b1226b28fb3fbd628eb5
|
|
BLAKE2b-256 checksum How to use checksums |
140cd8221102dfb6090f0dae54b34d99eca4fb9bfaa880aaca39ca7741a55023
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10
|
Security for qbstyles 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.