Makes plotting matplotlib easy.
Project description
Simple Python plot
Call this pip package to easily create:
- a boxplot
- a multi-line plot
- a latex table
Example Boxplot
python -m simplt --box-plot
Which is the same as running:
from simplt.boxplot.boxplot import create_box_plot
import numpy as np
extensions=[
".png",
],
filename="example_box",
output_dir="output",
# Fixing random state for reproducibility
np.random.seed(7)
# Generate dummy data.
first = [39, 44, 50, 50, 58, 63]
second = [80, 100, 100, 120]
# Add a name for each boxplot for in the legend, and y values.
y_series = {"data_1": first, "data_2": second}
create_box_plot(
extensions=extensions,
filename=filename,
legendPosition=0,
output_dir=output_dir,
x_axis_label="x-axis label [units]",
y_axis_label="y-axis label [units]",
y_series=y_series,
)
And creates:
Example Multi-Line Plot
python -m simplt --line-plot
Which is the same as running:
from simplt.line_plot.line_plot import line_plot
import numpy as np
extensions=[
".png",
],
filename="example_line",
output_dir="output",
multiple_y_series = np.zeros((2, 2), dtype=int)
# actually fill with data
multiple_y_series[0] = [1, 2]
lineLabels = [
"first-line",
"second_line",
] # add a label for each dataseries
single_x_series = [3, 5]
plot_multiple_lines(
extensions=extensions,
filename=filename,
label=lineLabels,
legendPosition=0,
output_dir=output_dir,
x=single_x_series,
x_axis_label="x-axis label [units]",
y_axis_label="y-axis label [units]",
y_series=multiple_y_series,
)
And creates a (colorblind-friendly) lineplot:
Example Multi-Line Plot
python -m simplt --dot-plot
Which is the same as running:
from simplt.dotted_plot.dotted_plot import plot_multiple_dotted_groups
import numpy as np
extensions=[
".png",
],
filename="example_dots",
output_dir="output",
multiple_y_series = np.zeros((2, 2), dtype=int)
# actually fill with data
multiple_y_series[0] = [1, 2]
groupLabels = [
"first_group",
"second_group",
] # add a label for each dataseries
single_x_series = [3, 5]
plot_multiple_dotted_groups(
extensions=extensions,
filename=filename,
label=groupLabels,
legendPosition=0,
output_dir=output_dir,
x=single_x_series,
x_axis_label="x-axis label [units]",
y_axis_label="y-axis label [units]",
y_series=multiple_y_series,
)
And creates a (colorblind-friendly) dotplot:
For Developers
Below are pip-package publication instructions.
Releasing pip package update
To udate the Python pip package, one can first satisfy the following requirements:
pip install --upgrade pip setuptools wheel
pip install twine
Followed by updating the package with:
python3 setup.py sdist bdist_wheel
python -m twine upload dist/\*
Developer pip install
Build the pip package with:
pip install --upgrade pip setuptools wheel
pip install twine
Install the pip package locally with:
rm -r dist
rm -r build
python3 setup.py sdist bdist_wheel
pip install -e .
Upload the pip package to the world with:
rm -r dist
rm -r build
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/\*
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
simplt-0.0.3.tar.gz
(22.0 kB
view details)
Built Distribution
File details
Details for the file simplt-0.0.3.tar.gz
.
File metadata
- Download URL: simplt-0.0.3.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e9c8eafc52b389dd42dd3b899dd652867a4ec3a30a6f2606dc2ac362bf599fb |
|
MD5 | c6d418cfcfb2d61f33a65d0c7905e94d |
|
BLAKE2b-256 | 2e72f9fc4d908ca02436229dcf7a2b525dcb2335049c63b7d7d366b2552cb133 |
File details
Details for the file simplt-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: simplt-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab9e6ae2aeb58cb02cb8e1aca35873c56da6a46ca66e520c0954ed4af9d0bbfc |
|
MD5 | eadc350db3f0c4d81b9f010b5ddf8af2 |
|
BLAKE2b-256 | 24072a09305701194cbaeab96622750d6426373128e03c9bfc6f5a4ca22d9189 |