Plots the graph of a function with ASCII characters.

Overview

ASCII Graph Plotter

GitHub License  Python Version  GitHub release  CodeFactor  visitors  Example: My use case 

Plots the graph of a function with ASCII characters.

See the change log here.

Developed by InformaticFreak (c) 2021

How to use

py main.py [function: str] [scale: float,float] [origin: int,int] [size: int,int] [discontinuous: bool] [precision: bool] [ascii_only: bool]
Parameter Type Default value Description
function str Defines the function
scale float,float 0.1,10 Scales the graph in x,y direction
origin int,int 40,20 calculated by (size-1)/2 Sets the origin of the plot to the list index x,y
size int,int 81,41 Sets the size x,y in characters of the plot
discontinuous bool false Specifies if the graph should be plotted discontinuously
precision bool false Specifies if the graph should be plottet with thinner characters oriented at the angle at the point
ascii_only bool false Specifies whether the graph should be plotted with thinner characters, depending on the slope at each point

Built-In Functions

  • sin, cos, tan, cot
  • asin, acos, atan, acot
  • degrees, radian
  • log, sign, sqrt

Built-In Constants

  • e, pi

Examples

  • Specifie the scale in x direction as 0.2 and use the default scale in y direction of 10, so write 0.2,_
  • Set the x origin to the list index 5 and use the default y origin of list index 20, so write 5,_
  • Use the default x size of the plot of 81 and specifie the y size of the plot as 32, so write _,32
  • Use the default for all other parameter, so don't write anything or use _ and _,_ as placeholder
py main.py sin(x) 0.2,_ 5,_ _,32

The result plot contains the plotted graph of the function and in the first line all parameter values to reproduce it. Also, the entire plot is copied to the clipboard.

f(x)=sin(x) 0.2,10.0 5,15 81,32 0 0 0

     ▲                                                                           
     │                                                                           
     │                                                                           
     │                                                                           
     │                                                                           
     ┤      ███                            ███                             ███   
     │     █   █                          █   ██                         ██   █  
     │    █     █                        █      █                       █      █ 
     │   █       █                      █       █                       █       █
     │  █         █                     █        █                     █         
     ┤  █         █                    █          █                   █          
     │ █          █                   █           █                   █          
     │█            █                  █           █                   █          
     │█             █                 █            █                 █           
     │█             █                █              █               █            
┬────█────┬────┬────█────┬────┬────┬█───┬────┬────┬─█──┬────┬────┬──█─┬────┬────▸
    █│               █              █               █               █            
    █│                █             █                █             █             
    █│                █            █                  █           █              
   █ │                 █          █                   █           █              
  █  ┤                  █         █                    █         █               
  █  │                  █        █                      █       █                
 █   │                  █       █                       █       █                
█    │                   █      █                        █     █                 
     │                    █    █                          █   █                  
     ┤                     ████                            ███                   
     │                                                                           
     │                                                                           
     │                                                                           
     │                                                                           
     ┤                                                                           
     │                                                                           
  • Set the discontinuous Parameter to default, so write _
  • Now specifie the precision Parameter to true, so write 1, true or True
  • Also specifie the ascii_only Parameter to true, so write 1, true or True

Note: Use 0, false or False to set a Parameter of type bool to false.

py main.py f(x)=sin(x) 0.2,10 5,14 81,32 _ _ 1

Now the plot contains only real ASCII characters and the character of each point depends on its slope.

f(x)=sin(x) 0.2,10.0 5,15 81,32 0 1 1

     A                                                                           
     |                                                                           
     |                                                                           
     |                                                                           
     |                                                                           
     +      --\                            --\                             --\   
     |     /   \                          /   -\                         -/   \  
     |    /     \                        /      |                       /      \ 
     |   /       \                      /       \                       |       -
     |  /         |                     |        \                     /         
     +  |         |                    /          |                   /          
     | /          \                   /           |                   |          
     |/            \                  |           \                   |          
     ||             |                 |            \                 /           
     ||             |                /              |               /            
+----/----+----+----\----+----+----+/---+----+----+-|--+----+----+--|-+----+---->
    /|               \              |               \               |            
    ||                |             |                \             /             
    ||                \            /                  |           /              
   / |                 \          /                   \           |              
  /  +                  |         |                    \         /               
  |  |                  |        /                      |       /                
 /   |                  \       /                       \       |                
/    |                   \      |                        \     /                 
     |                    \    /                          \   /                  
     +                     ---/                            --/                   
     |                                                                           
     |                                                                           
     |                                                                           
     |                                                                           
     +                                                                           
     |                                                                           
You might also like...
Glyph-graph - A simple, yet versatile, package for graphing equations on a 2-dimensional text canvas
Glyph-graph - A simple, yet versatile, package for graphing equations on a 2-dimensional text canvas

Glyth Graph Revision for 0.01 A simple, yet versatile, package for graphing equations on a 2-dimensional text canvas List of contents: Brief Introduct

DP2 graph edit codes.

必要なソフト・パッケージ Python3 Numpy JSON Matplotlib 動作確認環境 MacBook Air M1 Python 3.8.2 (arm64) Numpy 1.22.0 Matplotlib 3.5.1 JSON 2.0.9 使い方 draw_time_histgram(

Fully Automated YouTube Channel ▶️with Added Extra Features.

Fully Automated Youtube Channel ▒█▀▀█ █▀▀█ ▀▀█▀▀ ▀▀█▀▀ █░░█ █▀▀▄ █▀▀ █▀▀█ ▒█▀▀▄ █░░█ ░░█░░ ░▒█░░ █░░█ █▀▀▄ █▀▀ █▄▄▀ ▒█▄▄█ ▀▀▀▀ ░░▀░░ ░▒█░░ ░▀▀▀ ▀▀▀░

Text to ASCII and ASCII to text

Text2ASCII Description This python script (converter.py) contains two functions: encode() is used to return a list of Integer, one item per character

Img-to-ascii-art - Converter of image to ascii art

img-to-ascii-art Converter of image to ascii art Latest Features. Intoducing Col

Terminal-Video-Player - A program that can display video in the terminal using ascii characters

Terminal-Video-Player - A program that can display video in the terminal using ascii characters

An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters.
An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters.

Ascii Artist An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters. Installing Installing with

Use Convolutional Recurrent Neural Network to recognize the Handwritten line text image without pre segmentation into words or characters. Use CTC loss Function to train.
Use Convolutional Recurrent Neural Network to recognize the Handwritten line text image without pre segmentation into words or characters. Use CTC loss Function to train.

Handwritten Line Text Recognition using Deep Learning with Tensorflow Description Use Convolutional Recurrent Neural Network to recognize the Handwrit

A Python function that makes flower plots.

Flower plot A Python 3.9+ function that makes flower plots. Installation This package requires at least Python 3.9. pip install

Function-Plotter - GUI Python program that plots functions that are entered by the user
Function-Plotter - GUI Python program that plots functions that are entered by the user

FunctionPlotter GUI Python program that plots functions that are entered by the user. The program takes minimum and maximum value for x and plot it as

Plots is a graph plotting app for GNOME.
Plots is a graph plotting app for GNOME.

Plots is a graph plotting app for GNOME. Plots makes it easy to visualise mathematical formulae. In addition to basic arithmetic operations, it supports trigonometric, hyperbolic, exponential and logarithmic functions, as well as arbitrary sums and products.Plots is designed to integrate well with the GNOME desktop and takes advantage of modern hardware using OpenGL, and currently supports OpenGL 3.3+.

We provide useful util functions. When adding a util function, please add a description of the util function.

Utils Collection Motivation When we implement codes, we often search for util functions that are already implemented. Here, we are going to share util

This is my favourite function - the Rastrigin function.
This is my favourite function - the Rastrigin function.

This is my favourite function - the Rastrigin function. What sparked my curiosity and interest in the function was its complexity in terms of many local optimum points, which makes it particularly interesting and useful for testing any optimisation algorithms.

Azure-function-proxy - Basic proxy as an azure function serverless app

azure function proxy (for phishing) here are config files for using *[.]azureweb

Lambda-function - Python codes that allow notification of changes made to some services using the AWS Lambda Function
Lambda-function - Python codes that allow notification of changes made to some services using the AWS Lambda Function

AWS Lambda Function This repository contains python codes that allow notificatio

A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations
A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations

ASCIIMATICS Asciimatics is a package to help people create full-screen text UIs (from interactive forms to ASCII animations) on any platform. It is li

Display tabular data in a visually appealing ASCII table format

PrettyTable Installation Install via pip: python -m pip install -U prettytable Install latest development version: python -m pip install -U git+https

Format Covid values to ASCII-Table (Only for Germany and Austria)

Covid-19-Formatter (Only for Germany and Austria) Dieses Script speichert die gemeldeten Daten des RKIs / BMSGPK und formatiert diese zu einer Asci Ta

Repository to create Ascii art in CMD based on video file.
Repository to create Ascii art in CMD based on video file.

Made to take any file format, and transform it into ascii art, displayed as a video in the cmd. If the cmd formatting is wrong, try zooming a little and remember to make cmd fullscreen. I made my cmd fullscreen, and zoomed out one tic. Written in Python 3.9

Releases(2021.1)
Owner
InformaticFreak
InformaticFreak
An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters.

Ascii Artist An ascii art generator that's actually good. Does edge detection and selects the most appropriate characters. Installing Installing with

null 18 Jan 3, 2023
Plots is a graph plotting app for GNOME.

Plots is a graph plotting app for GNOME. Plots makes it easy to visualise mathematical formulae. In addition to basic arithmetic operations, it supports trigonometric, hyperbolic, exponential and logarithmic functions, as well as arbitrary sums and products.Plots is designed to integrate well with the GNOME desktop and takes advantage of modern hardware using OpenGL, and currently supports OpenGL 3.3+.

Alex Huntley 138 Dec 14, 2022
Conversion of Image, video, text into ASCII format

asciju Python package that converts image to ascii Free software: MIT license

Aju Tamang 11 Aug 22, 2022
Convert Image to ASCII Art

Convert Image to ASCII Art Persiapan aplikasi ini menggunakan bahasa python dan beberapa package python. oleh karena itu harus menginstall python dan

Huda Damar 48 Dec 20, 2022
Convert any image into greyscale ASCII art.

Image-to-ASCII Convert any image into greyscale ASCII art.

Ben Smith 12 Jan 15, 2022
Python library for ascii graphics

Python library for ascii graphics

Anton 6 Oct 20, 2021
Ascify-Art - An easy to use, GUI based and user-friendly colored ASCII art generator from images!

Ascify-Art This is a python based colored ASCII art generator for free! How to Install? You can download and use the python version if you want, modul

Akash Bora 14 Dec 31, 2022
Find target hash collisions for Apple's NeuralHash perceptual hash function.💣

neural-hash-collider Find target hash collisions for Apple's NeuralHash perceptual hash function. For example, starting from a picture of this cat, we

Anish Athalye 630 Jan 1, 2023
Hacking github graph with a easy python script

Hacking-Github-Graph Hacking github graph with a easy python script Requirements git latest version installed. A text editor (eg: vs code, sublime tex

SENPAI LEGEND 1 Nov 1, 2021
SGTL - Spectral Graph Theory Library

SGTL - Spectral Graph Theory Library SGTL is a python library of spectral graph theory methods. The library is still very new and so there are many fe

Peter Macgregor 6 Oct 1, 2022