Ascii PLOTTER for python 3 (APLOTTER3)
A stranger from the internet named Imri wrote this. You can read about Imri at their website, see their post about this code from some time in maybe 2007?, and download a zipfile of the original source.
I ported it to Python3 so I could generate some documentation with plots in it, and thought I should share the updated version in case someone else finds it useful.
How did I install this?
pip install aplotter3
How do I use this?
import aplotter3 as ap3
import numpy as np
x = np.sin(np.linspace(0, 6*np.pi, 100))
ap3.plot(x, x_size=60, y_size=15)
prints
|
+1 -\\ -\\ --\
| / \\ / \\ / \
| / \ / \ / \
| / \ / \ / \
|/ \ / \ / \
|/ \ / \ / \
--+--------\--------/--------\---------/-------\---------+--
+0 \ / \ / \ +99
| \ / \ / \ /
| \ / \ / \ /
| \ / \ / \ /
| \ / \\ / \\ /
-1 --/ \-/ \-/
|