3
Isovalue Color
Legend
This
chapter gathers all PHIGURE functions to create legends associated with
currently defined isovalues. These values are defined by one of the following
PHIGURE functions tset_isoval_list, tset_homog_isoval_list or
tset_regul_isoval_list. Undefined values can be represented on the legend
if tundefined_value is called before with a limited value definition
domain.
PHIGURE offers four types of legend representations:
- tisoval_legend_1 Defines a legend by the size of elementary boxes
and by a reference point. Each box is filled with the colour associated to a
value that is between two consecutive isovalues. The text representation of
these two isovalues is displayed beside each box.
- tisoval_legend_2 Defines a legend by a rectangle delimiting the set
of coloured boxes. Each box is filled with the colour associated to a value
that is between two consecutive isovalues. The text representation of these two
isovalues is displayed beside each box.
- tisoval_legend_3 Defines a legend by the size of elementary boxes
and by a reference point. Each box is filled with the colour associated to an
isovalue. The text representation of this isovalue is displayed beside each box.
- tisoval_legend_4 Defines a legend by a rectangle delimiting the set
of coloured boxes. Each box is filled with the colour associated to an
isovalue. The text representation of this isovalue is displayed beside each box.
- tisoval_legend_5 creates a legend defined by a single rectangular
box colored by colors associated to the list of current contouring values. Each
contour is annotated in the box by changing the color.
- tisoval_legend_linear creates a legend defined by a single
rectangular box colored by colors associated to the list of current contouring
values. The length of same-color area depends on the difference between two
following contouring values. 3 methods of contouring annotation may be
used.
The four types of legend representations can be parameterized through
the use of the following PHIGURE functions:
- tset_legend_label Definition and position of a legend title.
- tset_iso_legend_box_spacing Horizontal and vertical distance between
two isovalue boxes.
- tset_legend_value Assignment of numeric values with respect to each
isovalue box.
- tset_iso_legend_append_string Definition of a string to append to
each numeric value.
- tset_legend_path Number of columns and horizontal or vertical
orientation of the series of isovalues.
- tset_iso_legend_period Specification of the first and last isovalue
and the numerical difference between two isovalue boxes.
- tset_legend_margin Horizontal and vertical margins.
- tset_iso_legend_strings Character strings to associated with the two
boxes representing undefined values.
- tfloat_format Definition of the display format for numeric values.
- tundefined_value Definition of a finite domain of values.
- tundefined_rep Representation style of zones of undefined
values.
These functions must be called before calling tisoval_legend_1,
tisoval_legend_2, tisoval_legend_3, tisoval_legend_4,
tisoval_legend_5 or tisoval_legend_linear for the construction of a
legend. Additionally, it is possible to retrieve the current values for these
parameters for a specified legend structure by calling the following
functions:
tinq_legend_label
tinq_legend_value
tinq_legend_margin
tinq_legend_path
tinq_iso_legend_box_spacing
tinq_iso_legend_append_string
tinq_iso_legend_period
tinq_iso_legend_strings
C TYPES USED IN LEGEND FUNCTIONS
/* alignment type for the legend box with respect to its reference point */
typedef enum {
TBOX_CENTER,
TBOX_LEFT_BOTTOM,
TBOX_MIDDLE_BOTTOM,
TBOX_RIGHT_BOTTOM,
TBOX_MIDDLE_RIGHT,
TBOX_RIGHT_TOP,
TBOX_MIDDLE_TOP,
TBOX_LEFT_TOP,
TBOX_MIDDLE_LEFT,
} Tbox_alignment;
/* type of positioning for the label with respect to the isovalue colour boxes */
typedef enum {
TPOS_TOP,
TPOS_BOTTOM,
TPOS_LEFT,
TPOS_RIGHT
} Ttext_pos;
/* type of margins */
typedef enum{
TRELATIVE_MARGIN,
TABSOLUTE_MARGIN
} Tmargin_type;
/* type of value incrementing */
typedef enum {
TVERTICAL_INCREMENT,
THORIZONTAL_INCREMENT
} Tincrement_type;
/* Type of contouring aspect for linear legend */
typedef enum {
TLISO_LINEAR_TYPE1,
TLISO_LINEAR_TYPE2,
TLISO_LINEAR_TYPE3
} Tlegend_linear_type;


tisoval_legend_5



tisoval_legend_linear