
NCL > Application examples > Basic examples
ContourPlot example 3
Overlaying a ContourPlot on a LogLinPlot
This example demonstrates how to create the plot using HLU C library calls, HLU FORTRAN library calls, or NCL. The names of the example codes that create this plot are cn03c.c, cn03f.f, and cn03n.ncl.
Discussion
Some of the resources are controlled through a resource file called cn03.res.A detailed discussion about how to create the plot appears in the comments of the source code for the example.
Creating the plot using HLU C library calls
The HLU C program that generates this plot is called cn03c.c.
Creating the plot using HLU FORTRAN library calls
The HLU FORTRAN program that generates this plot is called cn03f.f.
Creating the plot using NCL
The NCL script that generates this plot is called cn03n.ncl.
The data
The data for this plot is defined in the header file (cn03c.h) for the C example and in an ASCII data file (cn03f.asc) for the FORTRAN example.
How to run this example
This example can be created using a C program (cn03c.c), a FORTRAN program (cn03f.f), or an NCL script (cn03n.ncl). The examples are installed in the following locations:
- $NCARG_ROOT/lib/ncarg/hluex/contourplot/cn03c.c
- $NCARG_ROOT/lib/ncarg/hluex/contourplot/cn03f.f
- $NCARG_ROOT/lib/ncarg/nclex/contourplot/cn03n.ncl
- $NCARG_ROOT/lib/ncarg/resfiles/contourplot/cn03.res
- $NCARG_ROOT/lib/ncarg/data/asc/cn03f.asc