Platform-agnostic, highly customizable sequence plotting in console
Project description
asciiplot
Platform-agnostic, highly customizable sequence plotting in console
Installation
$pip install asciiplot
Plot Appearance Configuration Options
Set:
- chart height & title
- the color of virtually all chart components and areas, picked from a wide array of shades due to the integration of colored
- consistent margin between consecutive data points to widen your chart
- the chart indentation within its hosting terminal, or whether it ought to be centered in it, respectively
- axes descriptions
- x-axis tick labels, which may be set to contain strings instead of just numeric values
- y-axis tick label decimal places
Usage Examples
from asciiplot import asciiize, Color
print(
asciiize(
[1, 1, 2, 3, 5, 8, 13, 21],
sequence_colors=[Color.BLUE_3B],
height=21,
inter_points_margin=5,
background_color=Color.LIGHT_SALMON_1,
label_color=Color.BLUE_VIOLET,
axes_background_color=Color.DEEP_PINK_3A,
title='Fibonacci',
title_color=Color.RED_1,
x_axis_description='x',
y_axis_description='y',
center_horizontally=True
)
)
from asciiplot import asciiize, Color
print(
asciiize(
[17, 21, 19, 19, 5, 7, 12, 4],
[7, 8, 3, 17, 19, 18, 5, 2, 20],
sequence_colors=[Color.RED, Color.BLUE_VIOLET],
inter_points_margin=5,
height=20,
background_color=Color.GREY_7,
title='Random Sequences',
title_color=Color.MEDIUM_PURPLE,
label_color=Color.MEDIUM_PURPLE,
x_axis_description='x',
y_axis_description='y',
center_horizontally=True
)
)
Acknowledgements
Core sequence asciiization algorithm adopted from https://github.com/kroitor/asciichart/blob/master/asciichartpy/
Testing
git clone https://github.com/w2sv/asciiplot.git
cd asciiplot
poetry install
make test # runs mypy, pytest doctest and outputs test coverage
License
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
asciiplot-0.1.6.tar.gz
(12.9 kB
view details)
Built Distribution
asciiplot-0.1.6-py3-none-any.whl
(15.9 kB
view details)
File details
Details for the file asciiplot-0.1.6.tar.gz
.
File metadata
- Download URL: asciiplot-0.1.6.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.8.13 Linux/5.15.0-43-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12e292b20d5b4891a75448b144aa0b52dfd13592852dae20685d8998e97f25cd |
|
MD5 | 45e008f65117d1fb28654421bfe59494 |
|
BLAKE2b-256 | 0e92447e0109e71847a2023f0d4b2d1353dd07c8a32a282549670a99c216825e |
File details
Details for the file asciiplot-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: asciiplot-0.1.6-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.8.13 Linux/5.15.0-43-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cae5c6228302bcc04e9faee5d2a7d70e72dfa63b41f31c98a8c40fb148ff864e |
|
MD5 | d96a918582f9892df68f7b918450354a |
|
BLAKE2b-256 | c0358bb6bb0a31ecebec3d775a837f1619b6b7a9e59ea84f6d26aa2229d6c157 |