rei-preso-plot
Python package for drawing graphs for presentation materials with matplotlib.
Description
A package for creating graphs suitable for presentation materials with matplotlib.
The created graph can be directly placed on a presentation slide with a nice design.
Requirement
- Python 3.11.1
- matplotlib 3.6.3
Installation
pip install rei-preso-plot
Usage
Using graph functions
Graph functions.
Can emphasize parts by adding color or embedding legends in line graphs.
When passing matplotlib.axes.Axes to the argument ax, it returns the matplotlib.axes.Axes. Therefore, using the functions of matplotlib, you can specify the drawing range, etc., after these functions.
| Function | Description |
|---|---|
reipresoplot.plot_line_graph |
Line graph drawing function |
reipresoplot.plot_bar_graph |
Bar graph drawing function |
| Code | Graph |
|---|---|
| for_line_graph.py | |
| for_bar_graph.py |
Using matplotlibrc files
By reading matplotlibrc files, you can customize the matplotlib style as a whole, i.e. without specifying it with rcParams, etc.
For details, see Matplotlib documentation.
| Function | Description |
|---|---|
reipresoplot.use_line_graph_style_as_global_settings |
Use matplotlibrc file for line graphs as global settings |
reipresoplot.use_bar_graph_style_as_global_settings |
Use matplotlibrc file for bar graphs as global settings |
reipresoplot.get_line_graph_mpl_style_path |
Get the path to the matplotlibrc file for line graphs |
reipresoplot.get_bar_graph_mpl_style_path |
Get the path to the matplotlibrc file for bar graphs |
If you want to apply the style globally to the entire graph plot, use reipresoplot.use_XXX_graph_style_as_global_settings.
from matplotlib import pyplot as plt
from reipresoplot import use_line_graph_style_as_global_settings
use_line_graph_style_as_global_settings()
plt.plot(x, y)
plt.show()
If you want to use it temporarily, use a context manager.
from reipresoplot import get_line_graph_mpl_style_path
mpl_style_path: str = get_line_graph_mpl_style_path()
with plt.style.context(mpl_style_path):
plt.plot(x, y)
plt.show()
Line graph changes
Please refer to the code at examples/using_matplotlibrc_files/for_line_graph.py for line graph changes.
| Before | After |
|---|---|
Bar graph changes
Please refer to the code at examples/using_matplotlibrc_files/for_bar_graph.py for bar graph changes.
| Before | After |
|---|---|
Test
You can test graph drawing with Pytest.
pytest
Author
License
© 2023 NakuRei
This software is released under the MIT License, see LICENSE.
Metadata
Release files for rei-preso-plot 0.1.0
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 |
|---|---|---|---|---|
| rei-preso-plot-0.1.0.tar.gz | 8.3 kB | Without provenance | Details for rei-preso-plot-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rei_preso_plot-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for rei_preso_plot-0.1.0-py3-none-any.whl |
Total release size: 20.3 kB
Release files / rei-preso-plot-0.1.0.tar.gz
| Download URL | rei-preso-plot-0.1.0.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e475c40da5f4f66b024854577a616613ab2771362b00795e4139ed9a3f5bcbbd
|
|
BLAKE2b-256 checksum How to use checksums |
47c9eb80374c1120124adc4ae924a7053c3289ecb9b48f2d99bfe330e747714a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / rei_preso_plot-0.1.0-py3-none-any.whl
| Download URL | rei_preso_plot-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b74a73725143b219c3661e9c24a387f064c68ef7d1d891f39bc3a45144ff79cb
|
|
BLAKE2b-256 checksum How to use checksums |
809e05b2e2f497761fdf49c6407fb5f791b7d5f1d7e5282d96a3e6be537beef4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Security for rei-preso-plot 0.1.0
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.