XyPlot example 15

Creating stacked plots

This example is created using HLU C library calls, HLU FORTRAN library calls, or NCL. It demonstrates how to create a set of four "stacked" XyPlots and how to use annotations to simplify the control and sizing of all the plots. The names of the source files for this example are xy15c.c, xy15f.f, and xy15n.ncl.

Discussion

This module discusses how to create this plot using HLU function calls or NCL. The resource file used with this example is called xy15.res.

This example illustrates the creation of a set of four "stacked" XyPlots. Each plot has the same X axis. By making the top three plots into annotations of the bottom plot, all four plots can be manipulated as a unit. To demonstrate this concept, the second frame sets the viewport of the base plot. Because all the annotations have their "amResizeNotify" resource set to True (in the resource file), all the annotation plots resize themselves proportionally to the change in the size of the base plot. Each plot draws a variation of a sinusoidal curve.

A more 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 xy15c.c.

Creating the plot using HLU FORTRAN library calls

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

Creating the plot using NCL

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

The data

The data for this plot is generated from within the HLU program.

How to run this example

The examples are installed in the following locations:

The resource file for this example is located in:

You can copy this example and run it by typing "ng4ex xy15c", "ng4ex xy15f", or "ng4ex xy15n". A copy of the source file will be placed in your current working directory. The source code will be compiled and automatically run for you.


Quick Start Guide Control Panel

NG4.1 Home, Index, Examples, Glossary, Feedback, QSG Contents, QSG WhereAmI?


$Revision: 1.9 $ $Date: 1999/03/23 21:15:25 $