There is, as one might expect, quite a long history of such tools, since text-only interfaces were the norm in the olden days.<p>When I was a young one doing physics in the '80s, we used CERN's HBOOK[1] to do all our (statistical) plotting. Recently while working on a Common Lisp project I had a use for something similar, remembered HBOOK, and "rolled my own"[2] (much simpler version).<p>Yes, a nice clean graph in a GUI or PDF is cleaner, but if you're working at the terminal already or in a REPL, it can be nice to just see the output there.<p>At the risk of downvotes: I do wish this particular project didn't require a working Ruby / Gem installation -- nothing against Ruby, but I'd be curious if there was an equivalent stand-alone executable written in Go or similar... something like [3]?<p>[1] <a href="https://cds.cern.ch/record/307945/files/" rel="nofollow">https://cds.cern.ch/record/307945/files/</a>
[2] <a href="https://github.com/eigenhombre/hbook">https://github.com/eigenhombre/hbook</a>
[3] <a href="https://github.com/gizak/termui">https://github.com/gizak/termui</a>
Looks really great! I love tools that work in the terminal.<p>I used <i>asciichart</i> in my <i>mortgage-and-investments</i> script for the terminal (shows a nice graph).<p><a href="https://github.com/whyboris/mortgage-and-investments">https://github.com/whyboris/mortgage-and-investments</a> <-- screenshot there<p><a href="https://github.com/kroitor/asciichart">https://github.com/kroitor/asciichart</a> <-- the library I used
If you really want to draw plots on the terminal, run `xterm -ti 340` and then use gnuplot, like this:<p><pre><code> gnuplot -e "set terminal sixelgd;set hidden3d;set view 60, 30, 1, 1.1;set samples 50, 50;set isosamples 52, 52;set contour base;set cntrparam order 8;set cntrparam bspline;splot [-12:12.01] [-12:12.01] sin(sqrt(x**2+y**2)) / sqrt(x**2+y**2)"</code></pre>
You want feedgnuplot: <a href="https://github.com/dkogan/feedgnuplot/">https://github.com/dkogan/feedgnuplot/</a><p>It gives you all the power of gnuplot. So you can make simple plots in the console, or fancy graphical ones, or output to files on disk or whatever.
Very nice. For live plots there is also ttyplot.<p><a href="https://github.com/tenox7/ttyplot">https://github.com/tenox7/ttyplot</a>
Would love to see something like this built into tqdm[0]. Being able to attach a graph to the output would be a fantastic complement to postfixing the progress bar with current numbers.<p>[0] <a href="https://pypi.org/project/tqdm/" rel="nofollow">https://pypi.org/project/tqdm/</a>
The weakest part about distributing these tools in Ruby for me has been rbenv wiping them away on switches. I rarely switch Ruby versions these days, but this used to be pain all of the time
So many times I've wanted a quick histogram of a list of values to get a feel for their distribution, but it's always felt like it's too much effort with the tools that I had available to me. This is perfect for it! Would be nice to be able to specify the bin size or clamp the values to a range, but that can be done with other tools in the pipeline.
You have been able to draw plots from proper graphing libraries using actual images for years in terminals that support the kitty graphics protocol. See<p>GNUPlot: <a href="https://sw.kovidgoyal.net/kitty/integrations/#tool-gnuplot" rel="nofollow">https://sw.kovidgoyal.net/kitty/integrations/#tool-gnuplot</a>
matplotlib: <a href="https://github.com/jktr/matplotlib-backend-kitty">https://github.com/jktr/matplotlib-backend-kitty</a>
Julia: <a href="https://github.com/simonschoelly/KittyTerminalImages.jl">https://github.com/simonschoelly/KittyTerminalImages.jl</a><p>The kitty graphics protocol is supported in three major terminals these days: kitty, WezTerm, konsole.
This is so cool. It reminds me of Markdown and Mermaid (<a href="https://github.com/mermaid-js/mermaid">https://github.com/mermaid-js/mermaid</a>), which can do a similar thing within a plain text file. Keep it up; looking forward to trying it out.
This will be the most hideous comment I've ever made on the internet.<p>I would die for something like this to be an emacs package, to be written in elisp. I do all my development and data processing in emacs on remote clusters and it is insanely efficient and quick to iterate. The only thing that slows me down is getting and making plots. I can, of course, but I still mount the drive and transfer plots as compressed images. Which is horrifically inefficient for doing very quick rapid iterations on the processing of data....<p>Of course, the effort to duplicate the functionality of this in elisp that properly displays in the emacs TUI would be herculean. But there's no way I can install ruby on my remote clusters :(
what's the point in all these terminal programs posted here every day? why would i ever draw stuff with text when it's just going to be converted back to pixels by the OS anyway? there's clearly a bigger reason than just being able to do stuff without the slow desktop environment. but what is it?
I feel like an in-terminal plotting tool would be a great fit for nushell (<a href="https://www.nushell.sh" rel="nofollow">https://www.nushell.sh</a>), because they already have the philosophy that tools where possible should return structured data rather than just text.
This is great (as is seeing all the other links in this thread for other variations). Makes me want to make a rpi dashboard for a retro "ops view" instead of the fancy/pretty graphs in APM tools.<p>Not saying I'd give those up, but would just a nice lil desktop ornament :)
gnome-terminal really need to support kitty like features, that is, draw images and plots directly inside the terminal, xterm can do that, konsole is adding them, gnome-terminal please add the support so I do not need switch to kitty(which is OK, but)
<p><pre><code> series2 = data.series
.map { |s| s.map(&:to_f) }
.each_slice(2).to_a
</code></pre>
Should we use data.series.lazy for better memory consumption ?
I remember trying to display graphics on a VT100 type terminal over a modem. It took forever to render on screen (you could see individual lines being drawn one by one).
Cool, but.. why?<p>I do like CLI apps, but due to the non-standard state of GUI development we reach for very inefficient hacks to display basically pixel data in a fundamentally text-based medium. I would much prefer well-integrated actual GUIs using more than 100x100 pixels.<p>Edit: I don’t really have a problem with this specific program. My point is more general in that we perhaps have the wrong abstraction level for our GUI programs. Those should be standardized and cross platform as well besides supporting remote access .
Gorgeious.<p>I would even use this just to be cool in the public :)<p>As a realted note, here is one similar thing in Powershell: <a href="https://github.com/PrateekKumarSingh/Graphical">https://github.com/PrateekKumarSingh/Graphical</a>