Gnuplot has an output mode - called "dumb" - that prints an ASCII plot to the terminal. See e.g. http://pastebin.com/WHcLZHPr This is very handy when running scientific codes on remote machines, and works in any terminal (not just iTerm2 like the submission).

I've been looking for a matplotlib extension to do the same thing, without success.

It's not as complete as matplotlib, but there is an ASCII plotting library which has a (very) similar API to matplotlib called bashplotlib: https://github.com/glamp/bashplotlib