Graph IDE ► Programming ► Point Map
The following is a complete script for programming a 2D Point Map Plot (Heat Map Plot). It loads a wavy heat map made from 10,000 z-values on a square grid.
|
The general API is define in the section Graphic. The following is API description specific to the Point Map Plot.
@@method(public, instance) (void) setGridXLength:(unsigned)xLength xMinimum:(double)xMinimum xMaximum:(double)xMaximum yLength:(unsigned)yLength yMinimum:(double)yMinimum yMaximum:(double)yMaximum;
| |
Call like this:
Sets the grid parameters. Since the grid is rectangular and uniform these are the only parameters needed to specify the grid. | |
@@method(public, instance) (void) appendValue:(double)aValue;
| |
Call like this:
Appends aValue to the list of values. Each value must be of type double. The number of values appended should equal the grid x-length times y-length. | |
@@method(public, instance) (void) appendAmplitude:(double)anAmplitude angle:(double)anAngle;
| |
Call like this:
Appends anAmplitude to the array of data values and anAngle to the array of angle values. Each value must be of type double and anAngle must be in units of radians. The number of amplitudes and angles appended should each independently equal the grid x-length times y-length. Notice how the unit of angle is in radians but when entering angles in the user interface the units are in degrees. In order to see the angle values (vectors) the stroke unit must be turned on in the point map graphic. | |
@@method(public, instance) (void)emptyData;
| |
Call like this:
Removes (empties) all data from the graphic. Call this right before adding new data points. |