As long term Irreal readers know, I was trained as a mathematician and later became a computer software engineer so you’d think I’d be pretty good at generating plots: Nope. I’m terrible at it. My go to tool is Gnuplot, which is powerful and flexible but hard to master for those of us who don’t use it regularly.
I’ve tried Org Plot as an intermediary but I couldn’t get decent results even though Org Plot is just a front end for Gnuplot. Charles Choi to the rescue. He has an excellent post on how to use Org Plot to make nice looking graphs.
His secret is leveraging YASnippet to take care of all the boilerplate that Gnuplot requires. That’s the real problem with Gnuplot. Setting it up requires a lot of very unintuitive specifications in an obscure configuration language. Choi’s solution is to make a YASnippet template for each type of graph so that it’s easy to insert it when needed.
Choi’s solution doesn’t stop there though. He also has a context-sensitive menu that’s activated when you click on an Org table. From there, you can pick the type of graph you want to plot and the appropriate boilerplate will be inserted. Another menu option will run Org plot and generate the graph. See his post for the details including the YASnippets and the Elisp code for the menu.
This is a nice solution for those of us who only occasionally generate graphs but still want them to look nice. And, of course, it’s yet another example of how Emacs lets you have it your way.