NCL Website header

NCL > Application examples > Basic examples

VectorPlot example 3

How to manipulate the FillArrow resources to demonstrate some of the stylistic variations on the appearance of filled vector arrows

This VectorPlot example can be created using NCL or HLU function calls. It shows how to manipulate the FillArrow resources to demonstrate some of the stylistic variations on the appearance of filled vector arrows. The names of the source files for this example are vc03c.c, vc03f.f, and vc03n.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 vc03.res. This file is used to change the default resource settings for the plot. Some of the VectorPlot line resources are tweaked in the resource file to show how to change the appearance of the vectors.

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 vc03c.c.

Creating the plot using HLU FORTRAN library calls

The HLU FORTRAN program that generates this plot is called vc03f.f.

Creating the plot using NCL

The NCL script that generates this plot is called vc03n.ncl.

The data

The data for this plot are from an ASCII file called "uvdata0.asc".

The data file is located in your NCAR Graphics data directory in a subdirectory called "asc". You can get the name of the data directory by typing "ncargpath data" at your shell prompt.

How to run this example

This example can be created using a C program (vc03c.c), a FORTRAN program (vc03f.f), or an NCL script (vc03n.ncl). The example is installed in the following location:

  • $NCARG_ROOT/lib/ncarg/hluex/vectorplot/vc03c.c
  • $NCARG_ROOT/lib/ncarg/hluex/vectorplot/vc03f.f
  • $NCARG_ROOT/lib/ncarg/nclex/vectorplot/vc03n.ncl
The resource file for this example is located in:

  • $NCARG_ROOT/lib/ncarg/resfiles/vectorplot/vc03.res
The ASCII data file is installed in the following location:

  • $NCARG_ROOT/lib/ncarg/data/asc/uvdata0.asc
You can copy this example and run it by typing "ng4ex vc03c", "ng4ex vc03f", or "ng4ex vc03n". A copy of the source file and resource file will be placed in your current working directory. The source code will be automatically compiled, linked, and run for you.