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.
Have you tried using cacaview on images? When I'm running scientific code on remote machines I use jupyter tunneled over ssh, but I assume you can't do that.
Thanks for the two(!) nice tips. Just looked at libcaca, but I'm having trouble installing on my laptop (OSX). Anyway the idea is mainly to remove gnuplot as a dependency from my scientific code; introducing a new dependency defeats the point a bit.
Jupyter would be a very nice way to interact - as you guess there are difficulties: playing well with the cluster queueing system, and currently the code is launched via an mpirun call. I'm open to suggestions.
You can checkout my other project https://github.com/daleroberts/tv which allows you to view images in any terminal supporting Unicode 9.0 fonts and true color. It uses GDAL for the backend which is easy to install on a Mac with:
Matplotlib has a "sixel" backend, which can render images in any terminal supporting the necessary protocol. Might be worth investigation, if you run or can run a terminal with that support - I was surprised how many do, either out of the box or recompiled to enable it.
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
"Never again be stuck not being able to see cats do stupid things in animated gifs when you don't have your web browser available"
Lol they do know how to sell their software xD. Thanks for link.
Tek emulation is very cool, and I wish it were possible to use it more... but the protocol doesn't allow you to clear parts of the screen, so the only way to undraw stuff is to clear the entire screen and redraw from scratch. This makes it really limited for interactive use.
(This limitation is there because the original display terminals used storage scopes with persistent phosphor --- there was no framebuffer, you just steered the electron beam around on the screen and lit areas stayed lit.)
The iterm image support is pretty simple (just a VT100-style command wrapped around a base64 encoded png). Maybe somebody can implement it for gnome/vte or something, and see if there's any traction.
I know it's not a traditional terminal, but GateOne actually has this. It's pretty interesting to use, weird to see a full quality picture in the middle of a terminal.
iTerm2's killer feature that I haven't seen in any Linux terms yet is tmux integration. Being able to treat a remote tmux session like a local terminal session — including tabs, splits and windows — is fantastic.
Great idea, I was just thinking yesterday that something like this should exist. Matplotlob seems to like automatically switching windows every time you plot something, so annoying!
I've been looking for a matplotlib extension to do the same thing, without success.