
NCL > Application examples > Basic examples
VectorPlot example 7
How to overlay contours and vectors on a MapPlot
This example can be created using HLU function calls or NCL. It emulates the LLU example "fcover" and shows how to overlay contours and vectors on a MapPlot. The names of the source files for this example are vc07c.c, vc07f.f, and vc07n.ncl.
Discussion
This module discusses how to create this plot using NCL or HLU C or FORTRAN calls. A resource file is included with this example, and it is called vc07.res. This file is used to change the default resource settings for the plot.A detailed discussion of how this example works appears in its source code.
Creating the plot using HLUs
The HLU C program that generates this plot is called vc07c.c.
Creating the plot using HLU FORTRAN library calls
The HLU FORTRAN program that generates this plot is called vc07f.f.
Creating the plot using NCL
The NCL script that generates this plot is called vc07n.ncl.
The data
The data for this plot are from an ASCII file called "fcover.dat".The data file is located in your NCAR Graphics examples directory. You can get the name of the examples directory by typing "ncargpath examples" at your shell prompt.
How to run this example
This example can be created using a C program (vc07c.c), a FORTRAN program (vc07f.f), or an NCL script (vc07n.ncl). The example is installed in the following locations:
- $NCARG_ROOT/lib/ncarg/hluex/vectorplot/vc07c.c
- $NCARG_ROOT/lib/ncarg/hluex/vectorplot/vc07f.f
- $NCARG_ROOT/lib/ncarg/nclex/vectorplot/vc07n.ncl
- $NCARG_ROOT/lib/ncarg/resfiles/vectorplot/vc07.res
- $NCARG_ROOT/lib/ncarg/examples/fcover.dat