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
Simple utility to tinker with OPlus images

OPlus image utilities Prerequisites Linux running kernel 5.4 or up (check with uname -r) Image rebuilding Used to rebuild read-only erofs images into

Wiley Lau 15 Dec 28, 2022
Pixel Brush Processing Unit

Pixel Brush Processing Unit The Pixel Brush Processing Unit (PBPU for short) is a simple 4-Bit CPU I designed in Logisim while I was still in school a

Pixel Brush 2 Nov 03, 2022
Wand is a ctypes-based simple ImageMagick binding for Python

Wand Wand is a ctypes-based simple ImageMagick binding for Python, supporting 2.7, 3.3+, and PyPy. All functionalities of MagickWand API are implement

Eric McConville 1.2k Jan 03, 2023
Vignette is a Python library to create and manage thumbnails following the FreeDesktop standard.

Vignette Vignette is a Python library to create and manage thumbnails following the FreeDesktop standard. Thumbnails are stored in a shared directory

3 Feb 06, 2022
PyPixelArt - A keyboard-centered pixel editor

PyPixelArt - A keyboard-centered pixel editor The idea behind PyPixelArt is uniting: a cmdpxl inspired pixel image editor applied to pixel art. vim 's

Douglas 18 Nov 14, 2022
Design custom QR codes with this web app!

My-QR.Art This web app lets users design their own QR codes to any domain. It can be acessed on my-qr.art. You can find some more background info abou

Marien Raat 406 Dec 20, 2022
Music Thumbnail Maker

Music Thumbnail Installing pip install TMFrame

krypton 4 Jan 28, 2022
Generate waves art for an image

waves-art Generate waves art for an image. Requirements: OpenCV Numpy Example Usage python waves_art.py --image_path tests/test1.jpg --patch_size 15 T

Hamza Rawal 18 Apr 04, 2022
Water marker for images.

watermarker linux users: To fix this error,please add truetype font path File "watermark.py", line 58, in module font = ImageFont.truetype("Dro

13 Oct 27, 2022
Python pygame project that turns your images to matrix rain

Matrix-Rain-An-Image This project implements the classic Matrix digital rain effect in python with pygame to build up an image provided with multiple

7 Dec 11, 2022
Png-to-stl - Converts PNG and text to SVG, and then extrudes that based on parameters

have ansible installed locally run ansible-playbook setup_application.yml this sets up directories, installs system packages, and sets up python envir

1 Jan 03, 2022
Convert bitmap images to seeds for Tiny-83 NFT project.

What is this? This tool allows you to convert any 14p high and 22p wide Bitmap (.bmp) to the seed needed for the Tiny-83 NFT project. Project Twitter:

shib_maximalist 1 Oct 31, 2021
⚡ZenGL is a minimalist Python module providing exactly one way to render scenes with OpenGL.

ZenGL is a minimalist Python module providing exactly one way to render scenes with OpenGL.

Szabolcs Dombi 133 Dec 17, 2022
Scramb.py is a region based JPEG Image Scrambler and Descrambler written in Python

Scramb.py Scramb.py is a region based JPEG Image Scrambler and Descrambler written in Python. Main features Scramb.py can scramble images regions. So

47 Dec 25, 2022
Fixed Version Of Blender Low Poly Rock Generator For Blender 3.0.0

Blender (3.0.0) - Low Poly Rock Generator This is an addon for Blender 3.0.0 to generate low poly rocks. It was based on an addon that unfortunately h

3 Mar 24, 2022
Create a QR-code Generator app using only Python.

QR-code_Generator Create a QR-code Generator app using only Python. This apps generated a QR code for a single link. Libraryes used in this app -- py

Soham P Phasalkar 1 Oct 17, 2021
Script For Importing Image sequences into scrap mechanic via blueprints

To use dowload and extract "video makes.zip" Python has to be installed https://www.python.org/ (may not work on version lower than 3.9) Has to be run

2 Oct 30, 2021
Pythonocc nodes for Ryven

Pythonocc-nodes-for-Ryven Pythonocc nodes for Ryven Here a way to work on Pythonocc with a node editor, Ryven in that case. To get it functional you w

Tanneguy 30 Dec 18, 2022
Tweet2Image - Convert tweets to Instagram-friendly images.

Convert tweets to Instagram-friendly images. How to use If you want to use this repository as a submodule, don't forget to put the fonts d

Janu Lingeswaran 1 Mar 11, 2022
A minimal python script for generating bip39 seed phrases, and corresponding Seed Signer Seed seed phrase qr code ready for offline printing.

A minimal python script for generating bip39 seed phrases, and corresponding Seed Signer Seed seed phrase qr code ready for offline printing.

CypherToad 8 Sep 12, 2022