Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cli-charts-0.0.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

cli_charts-0.0.1-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page