Skip to main content

Simple Graph Generator

Project description

Description

This is a simple tool for creating graphs from the terminal. It reads files contaning two numeric columns and create a graph from it.

Install

Just the usual python installation pattern:

pip3 install sgg

Examples

Consider two files:

file1.txt

0 500
1 550
2 600
3 650
4 700
5 750
6 800
7 850
8 900
9 950

file2.txt

0 2
1 4
2 8
3 16
4 32
5 64
6 128
7 256
8 512
9 1024

To create a graph comparing these two files, we can use the following command:

sgg --title '$f(x) = x$ versus $f(x) = x^{2}$' -y '$f(x)$' -x '$x$' -s '-' ' --' -l '$f(x) = x$' '$f(x) = x^{2}$' -f file1.txt file2.txt -c 'darkorange' 'royalblue' --xmin 0  --dest out.png

NOTE: If you are reading this file in PyPi you will be not able to see the png file, so go to the github repository .

The result are shown below :

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

sgg-0.0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

sgg-0.0.1-py3-none-any.whl (4.4 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