26 comments

[ 3.1 ms ] story [ 39.3 ms ] thread
Looks nice, but when might it be needed?
One possible use case is you run a CLI monitor app (stock, website traffic, etc.) and you need simple plots in it .
Debugging, mainly. And really really dirty and fast workflows, when you don't have time to do pretty graphics.

The other thing is not depending on GUIs, libraries, and stuff, makes it resilient and usable in hard conditions (e.g. if you accidentally remove some core system libraries but you still want to see a graph)

I use regularly UnicodePlots.jl for Julia when connected through ssh to HPC servers. It has boosted my productivity!
...always? Very often it's much cleaner to see your plots "inline" that on a separate window.
It is also possible to use kitty or other graphics capable terminal (iTerm2, mlterm etc) to show regular images inline when plotting from ipython3 or jupyter console (some extensions need to be installed).
Do you remember which extension?
This is one example https://github.com/grst/jukitty

I have some home made ones (working for kitty and mlterm/sixel etc), but they are not in shape for releasing.

ipython3 and jupyter console both have an image display hook you can use, but they work in different ways.

When using the Julia REPL I regularly use KittyTerminalImages [1], which is awesome because it fits perfectly with other plotting packages.

[1] https://github.com/simonschoelly/KittyTerminalImages.jl

Cool. The frontier for all of us is now to get screen and tmux to support it. Unfortunately it needs their buy-in (escapes/passthroughs don't work at all with scrollback)
I wanted something like this, but unfortunately there are some "black bars" generated that distorted the plot in my Windows Terminal. Hopefully they fix it. I've never got IPython interactive mode to work with Matplotlib. Alternative is just Jupyter notebook, then I had leave the terminal. I guess it's not a big deal, but something like this would help.
which windows terminal? Last time I had to use cmd or power shell, I ended up losing random lines of output. The new one (I'm blanking on the name) didn't have that problem, though.
Ironically, the new one is called “Windows Terminal”.
I really like this kind of thing, especially for debugging, but for such visualizations simple is better (if I wanted something fancier I'd use a GUI).

I use now hipsterplot, since it is much simpler and tweakable, but I wonder if heatmaps will be possible with this tool, since it uses color it could be

For me, this is a good alternative to matplotlib when I try to visualize a plot using WSL.

[edit]: matplotlib always crashed on me and failed to find Qt library.

This also seems like a good choice if you're training a model in a headless server via SSH and just want to plot out some data fast.
Very cool library!

As alternatives I might recommend hipsterplot (the name) or uniplot (very similar but lighter, I'm the author).

Did you consider creating a backend for Matplotlib which rendered to ascii?? That way a matplotlib user could simply switch backends when on the terminal, and then switch to something else when the execution context changes. I don't know if that's even feasible, but that was what I first this was when I saw plt.
Next step is to rediscover the 50-year old tektronix mode of xterm, and use that for cleaner vector graphics.
Why would one mimic matplotlib's API besides the fact that everyone knows it?

I use matplotlib a lot but I keep googling the same things again and again, which is my subjective indicator that something in the design is wrong. How to set log scales again? Do I apply this method to the figure or axis object? Setting a different backend (like agg) after pyplot was importet? Also, nested kwargs make it impossible for my IDE to give meaningful hints on parameters, not even talking about typed interfaces so far. Global state!

I mean, this library solves a truly complex problem and yes, I get things done but none of the hours working with it was close to be pleasant.

I wish some day someone is brave enough to enter new lands, leaving this matlab style of thinking behind.

There is no good reason to mimic matplotlib's API except that everyone knows it.
It would be cool if we could pipe any 2 dimensional data to this in the shell and it would render it. Also how does one read 2 dimensional data from CSV for instance? I wanna say sed but I don't know.

It would be handy for quick ad-hoc days analysis of log files or access logs.