Mapping the Earth
The main purpose of this recipe is to call attention to the fact that gnuplot comes with a very useful datafile called world.dat
. This consists of coordinates for a rough outline of the Earth's land masses, as latitude and longitude in the usual degree units. It can be used as a map background for plotting other geographically relevant data. In the following figure, we've overlaid some data on recent earthquake activity:
Getting ready
We've included a copy of the world.dat
datafile in case you've mislaid the one that comes with gnuplot. You also need to have the file earthquakes.dat
. This contains data from the United States Geological Survey and contains the locations, magnitudes, and other information about all the earthquakes in the world for three recent days. We've simply changed the format in which the latitudes and longitudes are recorded to make the data digestible by gnuplot. The S (South) and W (West) coordinates were turned into negative numbers and N (North) and...