Vvidget Code Reference Manual

Vvidget Code > Dictionary > Point Map Chart

This section explains how to form a dictionary for a Point Map Chart such as these:

Rectilinear Point MapX-Log Point Map
ExampleExample

A point map is a sequence of values that are arranged on a regular 2D grid, mapped to different colors and then those colors used as a fill color for rectangles. When the grid is dense then the point map chart can appear to be an image. Selecting the appropriate color mapping is somewhat of an art form, but blue for cold (or low) and red for hot (or high) is an obvious choice. However, there are other color mappings that produce amazing representations and there are inappropriate color mappings that create mass confusion so that one need be careful when doing the mapping. The grid can reside on a nonlinear coordinate system and be represented by turning on the stroke value for the rectangular cells. Much of that is very domain specific and beyond the scope of this reference manual.

An example code fragment illustration follows:

/* Start of Illustration Code Fragment */

[constructor VC_append_key:"chart_type" string_value:@"point map"];
[constructor VC_append_key:"chart_subtype" string_value:@"default"];
[constructor VC_append_key:"chart_format_type" string_value:@"default"];
[constructor VC_append_key:"title" string_value:@"My Title"];
[constructor VC_append_key:"x_title" string_value:@"My X Title"];
[constructor VC_append_key:"y_title" string_value:@"My Y Title"];
[constructor VC_append_key:"grid_x_length" string_value:@"5"];
[constructor VC_append_key:"grid_x_minimum" string_value:@"1.0"];
[constructor VC_append_key:"grid_x_maximum" string_value:@"5.0"];
[constructor VC_append_key:"grid_y_length" string_value:@"5"];
[constructor VC_append_key:"grid_y_minimum" string_value:@"1.0"];
[constructor VC_append_key:"grid_y_maximum" string_value:@"3.0"];
[constructor VC_append_key:"color_map_1_type" string_value:@"1"];
[constructor VC_append_key:"color_map_2_type" string_value:@"1"];
[constructor VC_append_key:"color_map_1_length" string_value:@"32"];
[constructor VC_append_key:"color_map_2_length" string_value:@"32"];
[constructor VC_append_key:"color_map_rgb_11" string_value:@"FF0000FF"];
[constructor VC_append_key:"color_map_rgb_12" string_value:@"FFFFFFFF"];
[constructor VC_append_key:"color_map_rgb_21" string_value:@"FFFFFFFF"];
[constructor VC_append_key:"color_map_rgb_22" string_value:@"0000FFFF"];
[constructor VC_append_key:"data_values" string_value:@"1.0 2.0 3.0 4.0 5.0 1.1 2.1 3.1 4.1 5.1 1.2 2.2 3.2 4.2 5.2 1.3 2.3 3.3 4.3 5.3 1.4 2.4 3.4 4.4 5.4"];

/* End of Illustration Code Fragment */

The code fragment above can be inserted into the illustration code section of the Illustration project for an immediate running Cocoa application. For additional information consult the Illustration section.

The following table defines the dictionary key and value pairs:

Chart Specific Entries
KeyValue Description
chart_type¹The string point map, indicating a Point Map Chart.
chart_subtype¹One of the strings {linear , semilog, x-log y-linear, log-log, polar, r-log} which specifies the graph coordinate type of {X-Linear, Y-Linear}, {X-Linear, Y-Log}, {X-Log, Y-Linear}, {X-Log, Y-Log}, {R-Linear, Theta-Degrees}, {R-Log, Theta-Degrees} respectively.
chart_format_type¹Always 0 (aliased to default).
titleThe main title of the graph. If this key is not present then the template's title is used.
x_titleThe x title of the graph. If this key is not present then the template's x-title is used.
y_titleThe y title of the graph. If this key is not present then the template's y-title is used.
grid_x_lengthThe number of grid cells in the x-direction.
grid_x_minimumThe minimum x-value of the grid.
grid_x_maximumThe maximum x-value of the grid.
grid_y_lengthThe number of grid cells in the y-direction.
grid_y_minimumThe minimum y-value of the grid.
grid_y_maximumThe maximum y-value of the grid.
color_map_1_typeThe color mapping type (0, 1, 2, 3).
color_map_1_lengthNumber of colors in map 1.
color_map_rgb_11Beginning color of the color mapping.
color_map_rgb_12Ending color of the color mapping.
color_map_2_typeThe color mapping type (0, 1, 2, 3).
color_map_2_lengthNumber of colors in map 2.
color_map_rgb_21Beginning color of the color mapping.
color_map_rgb_22Ending color of the color mapping.
templatesA custom Templates directory.
data_valuesA white space delimited list of values representing the z-values of the grid matrix. See Data Oriented keys for additional information and keys.

¹ Do not include this key value pair in the Interface Builder Plugin Inspector input string. It is included for you automatically.

If you incorporate this functionality into your own application then please consult Cocoa Programming. If you incorporate this functionality into CLI scripts then please consult Script Programming.

You can also modify the following Templates:

Template Document Names
TemplateDescription
PVST_Point_Map_ChartForms the static attributes for the X-Linear, Y-Linear graph.
PVST_X_Log_Point_Map_ChartForms the static attributes for the X-Log, Y-Linear graph.
PVST_Y_Log_Point_Map_ChartForms the static attributes for the X-Linear, Y-Log graph.
PVST_XY_Log_Point_Map_ChartForms the static attributes for the X-Log, Y-Log graph.
PVST_Polar_Point_Map_ChartForms the static attributes for the polar graph.
PVST_R_Log_Point_Map_ChartForms the static attributes for the r-log graph.

Please help improve this documentation. If a section is hard to understand, there is a typo, you would like a new section added, or you detect any other improvement that can be made then please email support@vvi.com with your information.




© Copyright 1993-2011 by VVimaging, Inc. (VVI); All Rights Reserved. Please email support@vvi.com with any comments you have concerning this documentation. See Legal for trademark and legal information.