5 ms·
Matplotlib already has a pretty uncomfortable API. I can’t imagine that wrapping that in a layer of elisp would result in anything nice to use at all. It would
by codetrotter 2y ago
Matplotlib already has a pretty uncomfortable API. I can’t imagine that wrapping that in a layer of elisp would result in anything nice to use at all.
It would probably be a case of the thing OP mentioned, where the amount of code needed would exceed just doing it yourself.
- setopt 2y agoGnuplot is the best plotting interface I’ve ever used. Once you’ve learned “the Gnuplot language”, it’s very fast and efficient to visualize anything and iterate on it interactively, and I personally find it more usable than GGPlot, Matplotlib, Seaborn, Bokeh, and Matlab. I think Gnuplot is undervalued because by default the results look horrible. Like many power tools, it requires some config in ~/.gnuplotrc to modernize the looks; http://gnuplotting.org/ http://gnuplotting.org/ is a great source to get started. Unfortunately, I’m mostly using Matplotlib these days because the data generation is in Python. But despite using it on and off for over a decade, I’m nowhere near my efficiency in Gnuplot, and often have to ask Google or Copilot for help if I’m doing something more complex.
- arnsholt 2y agoGnuplot is fantastic. And with the epslatex terminal, it sets the graphics in EPS and the text elements in TeXsobtgat you can get everything typeset juuuuuust right.
- dima55 2y agoTo address your python woes: https://github.com/dkogan/gnuplotlib/ https://github.com/dkogan/gnuplotlib/ Gnuplot is excellent, and I use it every day.
- billfruit 2y agoI find Gnuplot syntax to be terse and unintuitive, and having poor discoverability without constantly refer to the docs.
- setopt 2y agoIn Gnuplot you can indeed write each command in a very terse way; some simple examples: plot cos(x) ls 2, sin(x) ls 3 plot 'file.dat' u 1:2 w lp lw 3 ps 2 But you can also write the same code in a descriptive way: plot cos(x) linestyle 2, sin(x) linestyle 3 plot 'file.dat' using 1:2 with linespoints linewidth 3 pointsize 2 I think most people prefer the terse version once they learn it. But I’d definitely recommend learning the descriptive commands first, as the abbreviations follow very naturally from there.
- zelphirkalt 2y agoMatplotlib has 2 APIs, a procedural one and an object oriented one. Which one are we talking about? Or both?
- Cacti 2y agoSeaborn, plotly, datashader, etc. all exist to wrap matplotlib and they are wildly successful. Is there some reason an equally good interface couldn’t be written in elisp?
- lordgrenville 2y agoYou're not wrapping it in elisp. You can just write matplotlib in a code block, evaluate it, and pop out an image to your buffer.