Vvidget Code Reference Manual

Vvidget Code > Dictionary > Perspective Scatter Chart

This section explains how to form a dictionary for a Perspective Scatter Chart such as this:

Rectilinear Perspective Scatter Chart
Example

A perspective scatter chart is a sequence of x y z triplets (points) displayed with a point tag, which is either a graphic (marker) or label of some type. The default display is to show a little red dot at the point. The points are displayed on a 3D graph that is mapped via a perspective mapping to the page. The color of the dots can be mapped via a color mapping so they can represent another variable besides just location. The specifics are determined by the template configuration which is a Vvidget Builder document. The Vvidget Builder manual explains those issues in more detail.

For more data exploration and layout the graph can be exported to Vvidget Builder where it can be rotated in realtime. The default markers may be too small for your application and you can adjust them within the corresponding template.

An example code fragment illustration follows:

/* Start of Illustration Code Fragment */

[constructor VC_append_key:"chart_type" string_value:@"perspective scatter"];
[constructor VC_append_key:"chart_subtype" string_value:@"linear"];
[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:"z_title" string_value:@"My Z Title"];
[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 perspective scatter, indicating a Perspective Scatter Chart.
chart_subtype¹The string linear.
chart_format_type¹The string 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.
z_titleThe z title of the graph. If this key is not present then the template's z-title is used.
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 x y z coordinates of each point. 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_Perspective_Scatter_ChartForms the static attributes for the chart.

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.