
NCL > Application examples > Basic examples
Basic example 7
How to select a workstation device
This is an introductory example that shows how to create three simultaneous workstations. The example draws a TextItem object into an NCGM, PostScript, and X11 workstation. The TextItem output states which type of workstation it is being drawn into.

Discussion
This module describes how to draw a plot object into a X11 window, an
NCGM file, and a PostScript file. The example creates three simultaneous
workstations, and then draws a TextItem object that specifies the type
of output device into each workstation. A resource file,
basic07.res,
defines the output text strings' value, size, font, and color.
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 C program that generates this plot is called basic07c.c.
Creating the plot using HLU FORTRAN library calls
The FORTRAN program that generates this plot is called basic07f.f.
Creating the plot using NCL
The NCL script that generates this plot is called basic07n.ncl.
The data
No external data is used for this plot.
How to run this example
The examples are installed in the following locations:
- $NCARG_ROOT/lib/ncarg/hluex/basic/basic07c.c
- $NCARG_ROOT/lib/ncarg/hluex/basic/basic07f.f
- $NCARG_ROOT/lib/ncarg/nclex/basic/basic07n.ncl