A CLI tool for displaying simple bar graphs from an equation or a csv file
Project description
GraphCalc
About
I consider Desmos funni, so I decided to bring a similar graphing calculator to the terminal! I originally didn't want to bother with pyinstaller, so I didn't even use regex and instead coded parsing logic myself. The program takes in a math function (currently limited in operator support, i plan on adding more math functions later) and samples its value at multiple points. The values are then saved as a .csv and the program renders them with a bar graph
Options
--functionbasic mathematic expression including x. the default (for quick testing) isx*x/4.--x-offsetpositive integer, moves the "frame of sampling"--x-rangerange over which the program should sample, default is 8--samplenumber of samples to use, default is 16--filefile for csv output, default isfunction.csvRun options:--run, invokestermgraph(.py)after outputting the csv values--x-spacespace available for x axis in terminal, default is 86 to support small terminals, 126 and 168 work well.--labelprovidestermgraphwith x axis labels for each sample
Installation
Pyinstaller
Download both termgraph and termgraph-calc from the pybuilds folder and place them in the same folder.
Windows
Run pip install argparse
Download both termgraph.py and termgraph-calc.py from the root folder and place them in the same folder.
Linux/macOS
Download both termgraph.py and termgraph-calc.py from the root folder and place them into a folder of your choice.
In that folder, run
python3 -m venv .venv
source .venv/bin/activate
pip install argparse
To start the program in the venv, run
source .venv/bin/activate
python3 termgraph-calc.py
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hc_term_graph-1.0.0.tar.gz.
File metadata
- Download URL: hc_term_graph-1.0.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30918de763aae9ca0eaed54c567a2813655828add574dbb760a287a4c0b318dd
|
|
| MD5 |
da936b99a64604a528545f7931cb47ed
|
|
| BLAKE2b-256 |
0d6043543a78d826b725b5a5dba7d7e7c865df929c78bc8ba456a620a514cb81
|
File details
Details for the file hc_term_graph-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hc_term_graph-1.0.0-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
040f5b3a8183502bc09eab7351a750d18f90bd55eb3568c779cc2eb45a6b2358
|
|
| MD5 |
4e1337395db91366beca061bd322e0e0
|
|
| BLAKE2b-256 |
38e90533fd719fb4badf09e054dc0b968358afdbf0197775a07a1691d6ad4ee1
|