As somebody who grew up during the semi-graphic era, it makes me sad that we still use a 30 year old standard for terminals and cannot do direct plot in the main terminal (as opposed to the Tektronix separate window).
Unicode-based scientific plotting for working in the terminal
11–20 of 37 posts
Re: Unicode-based scientific plotting for working in the terminal
#12As somebody who grew up during the semi-graphic era, it makes me sad that we still use a 30 year old standard for terminals and cannot do direct plot in the main terminal (as opposed to the Tektronix separate window).
Re: Unicode-based scientific plotting for working in the terminal
#13As somebody who grew up during the semi-graphic era, it makes me sad that we still use a 30 year old standard for terminals and cannot do direct plot in the main terminal (as opposed to the Tektronix separate window).
Several terminals (kitty, iTerm2) do support plotting right into the terminal, but this is still sometimes useful if you don't want to load a while graphics stack just to do a simple plot.
Re: Unicode-based scientific plotting for working in the terminal
#14This is one of my favorite Julia packages! A fast plotting utility that outputs right to the terminal is one of those things that I didn't realize I needed until I found it.
Re: Unicode-based scientific plotting for working in the terminal
#15This is great! Anyone know of anything like this for Python or R?
Re: Unicode-based scientific plotting for working in the terminal
#16I recently found out that XTerm supports sixels natively if started with the "-ti 340" option. For example gnuplot can make use of that feature using the command "set terminal sixlegd". It turns out because of the way sixels are encoded (six vertical pixels in a row using bitplanes) it packs better than png when used in conjunction with the bzip2 packer. Every image can simply be encoded to sixel with imagemagick usi…
Re: Unicode-based scientific plotting for working in the terminal
#17This is one of my favorite Julia packages! A fast plotting utility that outputs right to the terminal is one of those things that I didn't realize I needed until I found it.
Having inline plots in the terminal - especially things like histograms which just work - is often quite handy. And it just works over an ssh connection.
Also, recently, Julia changed its sparse matrix display to show a picture of the sparse matrix (spy plot) using braille characters!
julia> a = sprand(20,20,0.2)
20×20 SparseMatrixCSC{Float64,Int64} with 67 stored entries:
⠀⠀⠁⠐⠄⠋⠡⠀⠐⡀
⢳⠁⠡⠈⠂⠀⠀⠁⢡⠑
⡠⠋⢠⡀⢄⢀⢀⠄⠈⠈
⠩⠄⠐⠨⠈⠀⠆⠂⠨⠤
⠄⠄⢀⢂⠠⢀⠀⠂⠆⠂Re: Unicode-based scientific plotting for working in the terminal
#18As somebody who grew up during the semi-graphic era, it makes me sad that we still use a 30 year old standard for terminals and cannot do direct plot in the main terminal (as opposed to the Tektronix separate window).
I was thinking something similar. Looking at this makes me wish a terminal app could just embed a PNG or whatever in its output.
Also, some terminals support the DEC SIXEL protocol² (again, I know mlterm does).
¹ https://www.iterm2.com/utilities/imgcat
² https://en.wikipedia.org/wiki/Sixel
Edit: I couldn't find a simple SIXEL sample — you'd think one of the popular sixel libraries would have some in unit tests, but no. So for the purpose of this thread (but maybe not forever, hence /tmp/),
curl https://datatravelandexperiments.com/kps/tmp/example.sixel
curl https://datatravelandexperiments.com/kps/tmp/example.osc1337
Those are such that output directly to the terminal will produce an image if that format is supported (and probably nothing if not, but I'm not making promises).Re: Unicode-based scientific plotting for working in the terminal
#19Being able to use GNUPlot with Sixel output or tools like lsix[1] is really cool! I think if support / libraries / knowledge about Sixels was more widespread, we would see some really nifty terminal applications cropping up.
Re: Unicode-based scientific plotting for working in the terminal
#20Earlier quoted context omitted.
Several terminals (kitty, iTerm2) do support plotting right into the terminal, but this is still sometimes useful if you don't want to load a while graphics stack just to do a simple plot.
Are they using a similar API/standard?