Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | Related Pages

Examples and tests

This page shows some examples produced by the example application, gracetmpldemo, using several templates. In each image, you will find two frames: Left-hand-side the template, right-hand-side the result using that template. For variable expansion, a fallback value "@c FAILED" is used for evaluation purposes.

Test01: basic data-type and legend-string test

In this test, two data types are demonstrated, i.e. data provided from the application and Literal-data which is provided by the template and goes literally to the output. Also, different ways of handling the legend string are shown.

The test is performed using a python script.

test01.jpg

Test02: copy-data and literal-data with variable expansion

In this test, the template contains two graphs, one of which is hidden from the applications and contains Copy-data sets and a Literal-data set. This so-called Protected graph contains a reference to a variable from another graph which tests for correct setup of the environment internals. This also applies for the variable references in the copy-data and literal-data sets.

Note the subtle difference between the two copy-data sets in magenta and red: The magenta one copies data from G1.S0 and uses the legend string the application sets for that dataset (which is the filename, transient.dat ), denoted by "$=" . The red copy-data set copies the same data, but uses the legend string provided by the template, as indicated by "$'". As the data points are the same for both the magenta and the red curve, you can only see the latter lying on top, actually.

The test also shows, that autoscaling can be turned off for certain axes (see lower graph) and that literal data is not used for autoscaling purposes (see blue data in upper graph).

The test is performed using the gracetmpldemo application.

test02.jpg

Test03: variable expansion and environments

This test shows how well variable expansion within the various environments works. The environments are:

Each of the environments can contain any number of variables - which of those are used in the template, is totally up to the template author. Also, if a variable is addresses from within the template that wasn't defined by the application, a fallback value can be used to print instead. Otherwise, nothing happens.

test03.jpg

Test04: multiple output pages

This test shows how GraceTMPL behaves when the application stores more graphs than the template defines. The output filename should then contain the pagenumber (i.e. filename-$p.agr ). GraceTMPL automatically outputs as many files as needed to store the requested graphs.

The pure horizontal and vertical data on pages 2 and 4 show how autoscale behaves, when the data has no true range in one dimension.

test04.jpg

Test05: autoscaling, hidden data

This test demonstrates graceTMPL's built-in autoscaling and how well this feature ignores hidden data. The test application supplies data with 100 times larger amplitude to the hidden data set and still the nonhidden data is scaled properly.

test05.jpg

Generated on Mon Sep 27 10:56:44 2004 for GraceTMPL by doxygen 1.3.2