June 27th, 2024

A New Package for Making Charts in Emacs: Eplot

A new package named eplot simplifies chart creation in Emacs, addressing limitations of existing tools. It emphasizes clear axes markings and offers interactive data manipulation, introducing efficient plot control through "headers." Despite being a work in progress, eplot is accessible on Microsoft Github for potential use, with plans for code enhancements.

Read original articleLink Icon
A New Package for Making Charts in Emacs: Eplot

A new package called eplot has been developed for making charts in Emacs. The author was looking for an easy way to create simple plots and found the built-in chart.el tool limited. The author emphasizes the importance of clear axes markings in charts and criticizes examples of poor axis labeling, like those found in Google Finance charts. The author decided to create eplot in Emacs instead of using a PHP tool due to the convenience of interactive data manipulation within Emacs. The eplot package allows users to easily adjust plots by typing M-x eplot in a buffer with numbers. The package introduces the concept of "headers" to control various aspects of the plots efficiently. While the package is still a work in progress, it is available on Microsoft Github for potential use. The author acknowledges the need for code consolidation and readability improvements in the future.

Link Icon 7 comments
By @breck - 4 months
Neat!

Really clever simplicity on how you added gradients.

This is one of my favorite spaces, so I'll add some generic advice which may or may not be helpful.

I once had the privilege of working for Max Roser and Hannah Ritchie at Our World in Data, as one of the engineers on their Grapher library (https://github.com/owid/owid-grapher), and learned a ton from them (and others on the team) about making great charts.

My one piece of advice from looking at your examples would be: don't neglect title, subtitle, and caption! They would be so easy to do well because you've already created your "simple headers thingies". A few words go along way. Check out "Storytelling with Data" by Cole Nussbaumer Knaflic for a great read on the subject. Owid's Grapher does those the best, IMO (followed closely by DataWrapper.de -- but that's not open source).

At some point, if you keep up with this, you'll also want to add a dataflow library and DSL. Hadley Wickham's dplyr in R was the GOAT, and I copied that in my Ohayo tool and in OWID Grapher's CoreTable library (https://github.com/owid/owid-grapher/tree/master/packages/%4...). Jeffrey Heer's newish Arquero (https://idl.uw.edu/arquero/) library is also along those lines.

Lately I've delving into Mike Bostock's new thing Plot (https://observablehq.com/plot/). So far, excited by it, but only spent a day or two with it at this point.

I don't use emacs anymore, but hopefully something helpful in the comments above.

By @TacticalCoder - 4 months
Oh that's why I couldn't find a recent "10% of Emacs bugs fixed": that's what he was working on! Cool stuff. A true Emacs guru.
By @throwanem - 4 months
This looks fantastic! One thought, using Emacs' feature of file- and directory-local variables for the chart config might make for a more flexible UX. (For example, I might be generating the data files and not want to have to manually modify before charting, or I might have a large directory of data files that I'd like to plot at will without having to apply a header by hand to each.)
By @zelphirkalt - 4 months
One could also use Python and matplotlib for plotting in org mode. Gnuplot is not the only thing one can use.
By @thecleaner - 4 months
Thats some solid hacking right there. Esp yhe gradient part . Also given that these plots are svg means they can the imported to latex or a web browser. The first option makes it a solid contender for doing plots that need embedding in papers. Congratulations, some good results here.
By @tetris11 - 4 months
> Microsoft Github

this is the first time I've seen these two words explicitly put together before, and it made my stomach turn, regardless of how many years it's been true