A python package for visualizing graphs and charts right in your CLI!
Project description
cli-charts
cli-charts is a simple Python package for visualizing graphs and charts directly in the CLI.
This library allows you to visualize graphs and charts straight in your CLI. Just provide the coordinates and see your chart in the command line interface.
Usage
To start, simply initialize the library like so:
from cli-charts import CHART
chart = CHART()
Parameters:
> granular(boolean) => To compress the chart to fit more space
To draw a graph:
chart.plot_graph([])
This prints out the graph of the values provided
Parameters:
> values(list) => A list of coordinates(should be a list of lists, each list containing two integers)
To draw a bar graph:
chart.draw_bar([], 7, 3)
This prints out the bar graph of the values provided, each bar having a width of seven characters with three spaces between them
Parameters:
> values(list) => A list of coordinates(should be a list of lists, each list containing a string and an integer)
> barWidth(int) => The size of the bars(default is 10)
> space(int) => The space between the bars(default is 5)
To draw a pictogram(also pictograph):
chart.draw_pict([], '&')
This prints out a pictograph of the values provided with value represented by '&'
Parameters:
> values(list) => A list of coordinates(should be a list of lists, each list containing a string and an integer)
> symbol(str) => Symbol to be used(default is '|')
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
Built Distribution
File details
Details for the file cli-charts-0.0.1.tar.gz
.
File metadata
- Download URL: cli-charts-0.0.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 163ca17ca37b478237b5db83ecb6e85b9bc9dc0fd80c880873b077839fcc977f |
|
MD5 | 2b8202bc7289bca13d5a3217416bc000 |
|
BLAKE2b-256 | 846d7fd55edd246e039dc54a15339b66305880edaaffe2f43b38e639001f5edf |
File details
Details for the file cli_charts-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: cli_charts-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b9188414e956fcec81b3e828c11fd7aea198090c91fc37fb60a72dc8d697427 |
|
MD5 | fa0dd220ec4f988ba2f6afc021d20365 |
|
BLAKE2b-256 | 748650e9f4d5d8cc9c3982c50c1ff29f9a4768bf8d2df212f1ffbdc71da84ed3 |