https://github.com/w2sv/asciiplot
Python package allowing for platform-agnostic, highly customizable sequence plotting in the console.
https://github.com/w2sv/asciiplot
asciiized-sequences chart charts console data-visualization gui plot python pythonmodule terminal
Last synced: 3 months ago
JSON representation
Python package allowing for platform-agnostic, highly customizable sequence plotting in the console.
- Host: GitHub
- URL: https://github.com/w2sv/asciiplot
- Owner: w2sv
- License: mit
- Created: 2021-03-23T14:44:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T20:25:39.000Z (over 2 years ago)
- Last Synced: 2025-03-15T22:45:33.866Z (3 months ago)
- Topics: asciiized-sequences, chart, charts, console, data-visualization, gui, plot, python, pythonmodule, terminal
- Language: Python
- Homepage:
- Size: 908 KB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# __asciiplot__

[](https://github.com/w2sv/asciiplot/actions/workflows/workflow.yaml)
[](https://codecov.io/gh/w2sv/asciiplot)
[](https://pypi.org/project/asciiplot)

[](https://pepy.tech/project/asciiplot)
[](https://github.com/w2sv/asciiplot/blob/master/LICENSE)__Platform-agnostic, highly customizable sequence plotting in the console__

## Installation
```shell
pip install asciiplot
```## Plot Appearance Configuration Options
You may set the/a
- chart height & title
- color of virtually all chart components, picked from a wide array of shades due to the integration of [colored](https://pypi.org/project/colored/)
- margin between consecutive data points
- tick point color, to make the tick points visually stand out in case of a margin having been set
- indentation of the entire chart, or whether it ought to be centered within its hosting terminal, respectively
- axes descriptions
- x-axis tick labels, which may be composed of strings instead of just numeric values
- y-axis tick label decimal places; the labels themselves will be computed auomatically from the passed sequences## Usage Examples
```python
from asciiplot import asciiize, Colorprint(
asciiize(
[0, 1, 1, 2, 3, 5, 8, 13, 21],
sequence_colors=[Color.BLUE_3B],
height=22,
inter_points_margin=5,
background_color=Color.LIGHT_SALMON_1,
tick_point_color=Color.RED_1,
label_color=Color.BLUE_VIOLET,
label_background_color=Color.DEEP_PINK_3A,
title='Fibonacci',
title_color=Color.RED_1,
x_axis_description='x',
y_axis_description='y',
center_horizontally=True
)
)
```
```python
from asciiplot import asciiize, Colorprint(
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
)
)
```
## Credits
The core sequence asciiization algorithm was adopted from [asciichartpy](https://github.com/kroitor/asciichart/blob/master/asciichartpy/).## Run Tests
```shell
git clone https://github.com/w2sv/asciiplot.git
cd asciiplot
poetry install
make test # runs mypy, pytest, doctest and outputs test coverage
```## License
[MIT](https://github.com/w2sv/asciiplot/blob/master/LICENSE)