A collection of Gnuplot examples

I needed to use Gnuplot a little bit over the last few days, mostly to create 2D line charts, and these are my brief notes on how to get started with Gnuplot. If you haven’t used it before, it’s a pretty amazing tool.

Jumping right in ...

Back to top

Installing gnuplot

Use MacPorts or Homebrew to install Gnuplot on Mac OS X systems:

port install gnuplot
brew install gnuplot
Back to top

Sample data files

My examples use the following 2-column and 4-column data files:

Back to top
Ten things fab leaders do alvin July 5, 2017 - 9:39am

“Ten things fab leaders do,” a nice graphic from Helen Bevan.

2016 NBA Finals “game flow” chart

I like this chart/infographic from that shows the “game flow” for Game 5 of the 2016 NBA Finals. Without watching the game you can get a feel for the ebb and flow of the game, and how it got away from Golden State.

It reminds me of trying to get a software project live, where the developers are knocking out tasks and bugs (and if the project isn’t in control, other forces are trying to add new tasks, which I always compared to moving the finish line in a race).

Example of a radar chart alvin March 14, 2016 - 8:56am

This is an example of a “radar chart,” and comes from this page. It looks like a nice way to visualize a set of characteristics. For instance, you could use a chart like this to judge different qualities about a movie, such as whether it is romantic, action-packed, and so on.

A simple way to show many stock quotes and charts

Many moons ago I thought I wrote an AppleScript script named GetStockUrls, whose sole purpose was to open many webpages from at one time. I could run that script, then easily look at the stocks I owned.

Today I found that script on an old Mac computer, and when I did that I saw that I didn’t write it with AppleScript, but instead created it with the Mac Automator. This image shows all you have to do in the Mac Automator to achieve this result. On my current Mac this script opens the Safari browser and opens each URL shown in a new tab. I can then move between the tabs to see what I want to see, quickly and easily.

This image shows what the result looks like in the Safari browser:

Is the "War on Drugs" working?

This article shares the graph shown that says the “War on Drugs” isn’t working. That appears to be true, but unfortunately you can’t really know that it’s true because there is no control group. What I mean is that we have no idea what the drug addiction rate would be like if we had not spent all this money on this so-called war. Maybe the rate would be 1.3%, or maybe it would be 5%; we don’t know.