2.3.4. Attaching a Legend

In GraphMaster we have seen how to associate a legend with a curve visualization using PoItemLegend( C++ | Java | .NET )node. Other legend nodes derived from PoLegend( C++ | Java | .NET )are very useful in 3DdataMaster. These legends will allow you to visualize the data-color mapping and to “explain” your results.

3DdataMaster provides two main types of legends: automatic and non-automatic. Automatic legends will specify the geometry of inside “items” on their own, unlike non-automatic legends where your application must specify the geometry of each item.

Figure 2.53. Legend node classes


Different value legends
Different value legends
Different value legends
Different value legends

Figure 2.54. Different value legends


To create a legend, you must go through the following steps:

[Note]

If you only set data mapping, then the legend will use the minimum and maximum values of the data mapping definition as its bounding values. In some cases, the data mapping does not define any bounding values, and thus you must then specify the isovalue list or at least its bounding values. If you set the isovalue list, 3DdataMaster will use the data mapping to determine which color is associated with each value.

The following example (located in $OIVHOME/src/MeshViz/Mentor) shows a way to build a legend, using data mapping and an isovalues list:

Example 2.33. Use of value legend