When you use the LLU interface, you may be required to call a number of routines in a prescribed way to accomplish a desired task. This is usually the case with more complex contouring and mapping examples. To determine which subroutines you will need and in which order they must be called, you need to know a lot about the contouring and mapping libraries.
In the HLU case, you only need to know how to assemble an HLU program. This requires that you create a number of objects: one to access the data to be plotted, one to create the plot (in this case the ContourPlot object) and one to tell your program where to send the graphics (a Workstation object). However, this structure is the same in all HLU programs. Once you master the concepts of building an HLU program, you will find that it is relatively straightforward to build other programs with entirely different functionality. Moreover, example HLU programs are available which span the range of HLU functionality. ng4ex describes how the examples can be listed, copied into your working directory, and executed.
The LLUs of NCAR Graphics were written and updated at different times by different software developers; thus, the same function in two different utilities, such as setting up a ticked and scaled plot grid, is typically done in different ways. In the case of the HLUs, the TickMark object is used as the source of all 2-D plotting grids.
Consider, for example, that you are experimenting with the appearance of a plot in order to get it up to the quality needed for publication. In the LLU case, each time you change the value of any parameter, such as a color, line width, label, or text font, you will need to re-compile, link, load, and run to see the effects of your changes. In the case of the HLUs, you can change the values of resources in a resource file, then re-execute the HLU module and view the new graphic. This process is more efficient in both computer and user time.
There are some features of the HLUs that are not available in the low level libraries. For example, the XyPlot utility allows you to input a nonlinear data scale for either axis. The data plotted along a nonlinear axis is placed using a spline fit.
If you are adept at programming with the LLUs, you may not want to invest the time necessary to learn a new interface.
The utilities referred to as LLUs in Version 4 of NCAR Graphics are the traditional graphics libraries of Version 3. New features and utilities have been added, but the utilities and tools work in the very same way as they did for Version 3. In fact, any Version 3 user codes should run equally well using the Version 4 libraries. Users can still use the same set of commands and tools including ncargex, ncargcc, and ncargf77. So, if you prefer to use the traditional library utilities such as Conpack, Autograph, or Ezmap, you may continue to do so.
The LLUs give you the ultimate user-level control over the software. In order to provide a simplified interface, the HLUs have to make some choices for you.
Functionality available in LLUs--which is not available in HLUs as of the Version 4.1 release--includes histograms, 3-D wireframe surfaces and isosurfaces, weather maps, and polypack. (Note: it is possible to call the routines in these LLUs from your HLU program.)
Remember that Version 4.1 contains all of the LLU functionality that Version 3.2 had, and more. This functionality can be accessed through Fortran and C programs as described in the LLU documentation whose links are given below. The ncargex command can be used to list, copy, or execute Fortran or C example LLU programs. The comparable HLU command is ng4ex. Man pages exist for both ncargex and ng4ex.
There are also commands for linking your programs with the NCAR Graphics
libraries. For linking with the LLU library, use ncargf77 or ncargcc.
ncargf77 myprogram.f
would compile my Fortran program,
link it with the LLU libraries, and execute it.
ncargcc myprogram.c
would do the same for my C program.
These commands do not link in the HLU libraries.
Similar commands for linking with the HLU library are nhlf77 (Fortran) and nhlcc (C). These commands also link in the LLU Libraries.
Note that the nhlf77 or nhlcc commands can be used to execute LLU programs, but ncargf77 or ncargcc commands cannot be used to execute HLU programs.
For example,
cmpgrp.f is an LLU mapping example. It can be executed using either
nhlff cmpgrp.f
, or ncargf77 cmpgrp.f
.
The ncargf77 version will use less memory space since fewer libraries will
be linked. However, if you copy the HLU TextItem example, tx03f.f, into your
working directory with the command ng4ex -n tx03f
, and then try
to use ncargf77 tx03f.f
instead of nhlf77 tx03f.f
to run it, you will get a list of unresolved references in the program
load stage.
NG4.1 Home, Index, Examples, Glossary, Feedback, UG Contents, UG WhereAmI?