Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I think Gnuplot is strongest when you want a pretty plot of a complicated function (3D, parametric, etc). Grammar of graphics approach is optimized for understanding data sets.

For strengths of plotnine, ggplot, and Altair over Gnuplot (or matplotlib), see section 3.3 of the article, particularly the example

ggplot(data=mpg) + geom_point(mapping=aes(x="displ", y="hwy", color="class"))

You can easily replace 'color' with 'shape', or even faceting (getting a separate plot for each class).

I do not know Gnuplot very well -- what's the easiest Guplot way to do this? [1] I do know that when I was looking at data sets, switching from plain matplotlib (where you'd have to plot in a loop over each class) to the grammar of graphics style was a breath of fresh air for me.

Separately, and less interestingly, if you are already using Python or Jupyter, Gnuplot isn't as smoothly integrated into that ecosystem.

[1]: The first thing I found on the website is http://gnuplot.sourceforge.net/demo_5.4/varcolor.html, but perhaps there's a better or more minimal example?



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: