Gnuplot

Gnuplot is a portable command-line driven graphing utility for Linux, OS/2, MS Windows, OSX, VMS, and many other platforms.

I have been using Gnuplot for some of my antenna-range measurements using a GPS module and a microcontroller.

The way I use it on Linux, there are four files required to create a new plot:

data file

This is data in CSV (comma separated values) and the column numbers need to match what the Gnuplot script expects. A common format would be to have whatever you're measuring (e.g. signal strength, or voltage) in the first column, gps latitude and longitude in the second and third columns, maybe elevation in the fourth column, and gps timestamps (usually in UTC format) in the fifth column. But once you have closer look in the gps.gnuplot.txt script file you should be able to change this around. The columns in the script file are referred to as $1, $2, $3, etc..

map image

A map in .png format of the area that covers the range where GPS measurements were made. Although not strictly required for generic Gnuplot use, I used a bash script as a pre-processor to feed the coordinates as read from the map image's filename. This way no script files need to be edited, only the map image filename. The filename needs to contain the top-left and bottom-right coordinates in a specific order.

plot-coverage-map.sh

This is a Linux bash shell script that will run some checks to make sure that the input files exist and that the coordinates are found in the filename. It also allows for adjusting the position of the data on the map if the coordinates don't exactly align. The script will scan the map image to get the dimensions and pass it on to gnuplot. The code for this file is shown below.

gps.gnuplot.txt

The script that contains all the functions to combine the data and the map and produce the resulting plot image. It uses various variables that are fed from the bash script so that this file needs very little editing to make plots for different input files. The code for this file is shown below.

NOTE: you may need to swap the latmin/latmax or lonmin/lonmax values if you're in the northern hemisphere or west of Greenwich.

Example final image with the data plotted, legend, title and axis labels.

Since the data file and the map image are dependent on your preferences, I have only listed here the contents of the bash script and the gnuplot script.

For the background map I just use google maps and do a print-screen of an area. I then right-click on the map to get the coordinates and put those for the top-left and bottom-right corners of the image into the filename.