FAQ: Annotation and Graphing


12.1 What do limitsX, limitsY in the AG Viewport object do?

How do limits differ from geometry?

A viewport acts in many ways like a world object. That is, you may draw graphics directly into the viewport and thus, you need an 'address space' for it.

It is a good idea to draw an object such as a title into the viewport since it will then be correctly placed, even if the limits of the world objects change.

If, in fact, you have a world with no children, the world will "inherit" the limits from the viewport. That is why the default axes range from -5 to 5, since this is the default limits of the viewport.

12.2 How are number and position of labels computed by the axes objects?

For AGX/YAxis, it is based on the number of X values in the data (and the position of the bars for bar graphs).

For AGX/YUserAxis, the number and position of the labels is not determined from the data. They are based on world coordinates, not on the data.

12.3 How can I create graphs of discontinuous data?

You need to tell the AG kit that certain points contain no data. Then it will create discontinuous graphs. The AG kit uses the value MAX_FLOAT to identify a NULL value so you need to follow the steps below.

  1. Create a module with a short C++ method that sets a floating output parameter to MAX_FLOAT (found in limits.h)
  2. In the Y series of data put a connection to this module (something like: {-1.4, 3.007, .module_nul_value.out, 1998.887})

Note: Just typing in the MAX_FLOAT value into a float parameter does not work.