7 ms·
Plotext – Python Plotting on the Terminal
- 3dsynd 5y agoLooks nice, but when might it be needed?
- temp8964 5y agoOne possible use case is you run a CLI monitor app (stock, website traffic, etc.) and you need simple plots in it .
- sharikous 5y agoDebugging, 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)
- ziotom78 5y agoI use regularly UnicodePlots.jl for Julia when connected through ssh to HPC servers. It has boosted my productivity!
- enriquto 5y ago...always? Very often it's much cleaner to see your plots "inline" that on a separate window.
- kzrdude 5y agoIt 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).
- fzimmermann 5y agoDo you remember which extension?
- kzrdude 5y agoThis is one example https://github.com/grst/jukitty 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.
- ziotom78 5y agoWhen 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 https://github.com/simonschoelly/KittyTerminalImages.jl
- kzrdude 5y agoCool. 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)
- ConfusedDog 5y agoI 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.
- toomanyducks 5y agowhich 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.
- justusthane 5y agoIronically, the new one is called “Windows Terminal”.
- sharikous 5y agoI 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
- temp8964 5y agoR has something similar, it's called textplot.
- sundarurfriend 5y agoAnd Julia has UnicodePlots (https://github.com/Evizero/UnicodePlots.jl https://github.com/Evizero/UnicodePlots.jl).
- frankensteins 5y agoFor 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.
- lasagnaphil 5y agoThis 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.
- olavolav 5y agoVery cool library! As alternatives I might recommend hipsterplot (the name) or uniplot (very similar but lighter, I'm the author).
- chaganated 5y agostockholm syndrome
- id_ris 5y agoDid 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.
- dima55 5y agohttps://github.com/dkogan/gnuplotlib/ https://github.com/dkogan/gnuplotlib/ (for python) and https://github.com/dkogan/feedgnuplot/ https://github.com/dkogan/feedgnuplot/ (commandline interface) both have a "dumb" terminal that does this.
- enriquto 5y agoNext step is to rediscover the 50-year old tektronix mode of xterm, and use that for cleaner vector graphics.
- luoc 5y agoWhy 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.
- id_ris 5y agoThere is no good reason to mimic matplotlib's API except that everyone knows it.
- barbazoo 5y agoIt 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.