Even in the Era AI, GGPlot's API is still the best charting API. The name "Grammar of Graphics" isn't just marketing, they literally sought to write a god damn grammar to was capable of expressing all possible qualitative graphics.
They even wrote a book about how they went about it (not that it speaks to the quality of the API) https://link.springer.com/book/10.1007/0-387-28695-0
I actually stumbled upon this book when I was trying to look up how draftsmen (with pens and pencils on paper) did qualitative graphics as I found they had a lot of charm as opposed to modern charting libraries. It's something I noticed when looking through a bunch of historical RBA (Reserve bank of Australia) annual reports, the 1960-1980 charts had a lot of character, but then you go into the early 2000s and its a stale chart from excel.
Anyways ggplot doesn't really recapture the magic of those older charts, but it seems use quite a few of those as a baseline for how to communicate information. Like in figure 20.1 they talk about efforts to replicate older inforgraphics that showed Napoleon’s March on Russia, this graphic here (I think the example in the book is a bit nicer than the one in this blogpost IMO)
https://www.andrewheiss.com/blog/2017/08/10/exploring-minard...
On top of the charts just look nicer than anything you could produce with pyplot (and any API built on top of it) as pyplot seems to be have some really limited raster based rendering or something and the text handling is incredibly limited, I've never had this issue in ggplot.
I feel like most software engineers aren't exposed to because it exists in the R ecosystem which is more so data scientist, econometricians, statisticians and other quantitative data professions, but it definitely one of the nicer APIs and I wish more people in the node and python ecosystem copied their homework. I see vega's full name is something to do with grammars, but idk it's for the same reason.
williamcotton
today at 6:50 AM
> They even wrote a book about how they went about it (not that it speaks to the quality of the API)
Wilkinson’s Grammar of Graphics inspired ggplot. The textbook doesn’t even mention ggplot.
Shameless plug for my own GoG inspired DSL, Algraf:
https://williamcotton.github.io/algraf/demos
There’s a Minard plot in the demos!
Oh… I assumed it was a further expansion of the ideas that with into ggplot as they all look like ggplot charts and ideas were identical
I wish I could edit my original comment to add this correction.
__jochen__
today at 11:39 AM
nice, but did you expect it to not work on Safari (WASM fails)?
williamcotton
today at 12:04 PM
Safari is my default browser and it seems to be working just fine!
To be fair, the Vega-lite backend is json mostly based on GG ideas.
In this vein, I think I prefer ggsql that made it to HN recently [0].
[0]: https://ggsql.org/
nylonstrung
today at 12:13 PM
Yeah Grammar of Graphics semantics are already very ideal for both humans and agents alike. Ggsql is a recent project that implements it as SQL user defined functions which is even more agent friendly
I dont see what this brings to the table
How would you quantify the magic of these older charts? What is it that makes them have charm and character?
I made this a while back never finished it, but it’s a slide show of the different styles of graphics the RBA used over time
https://x.com/Angus_KST/status/2057757395196293262/video/1?s...
It’s incomplete but it show cases some of what I mean. There’s just a lot more charm in these earlier graphics. I’m fairly certain they had to consider how the different colours of ink bleed on one another.
Like take 1978 for example, this might be some kind of highlighter ink, and when the colours over lap the grid they interact in ways most overlapping geometry don’t in charting libraries (but in CSS you can get a similar effect with mix-blend-mode: multiply)
https://www.rba.gov.au/publications/annual-reports/rba/1978/...
If you go to page 159 of the most recent RBA report, you’ll see otherwise clean clear charts that do a good job of communicating the relevant information (perhaps that’s all there should do from such an institution), but it’s admittedly soulless compared to the charts from previous decades
https://www.rba.gov.au/publications/annual-reports/rba/2025/...
not the parent, but one thing i find charming is that a lot of them have a really good feel for line weight and inking style, and vary it interestingly in various parts of the plot. computer generated charts tend to have a much more uniform line weight.
Note that if you are affiliated with a University you probably can download a pdf of the book in the link for free.
Yeah that's how I got a copy, found it on my unis digital library.