Skip to content
Advertisement

Python ASCII plots in terminal

With Octave I am able to plot arrays to the terminal, for example, plotting an array with values for the function x^2 gives this output in my terminal:

JavaScript

Is there some way I can do something similar in Python, specifically with matplotlib? bashplotlib seems to offer some of this functionality but appears to be quite basic compared to Octave’s offering.

Advertisement

Answer

As few answers already suggested the gnuplot is a great choice.

However, there is no need to call a gnuplot subprocess, it might be much easier to use a python gnuplotlib library.

Example (from: https://github.com/dkogan/gnuplotlib):

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement