Normalizing field coordinates for large data values

My data values are large but the range between values is small and my chart is bouncing around.

This is a known behavior with the OpenGL renderer where doubles values are converted to floats precision is lost. This is most noticeable when a user uses data values as coordinates for vertices when creating a field. This is not an OpenViz related issue.

 

The solution is to remap the data values to a normalized coordinate extent range and thus allow OpenGL to calculate and render correctly.

Step-by-step guide

For an example with two columns of data, one for X and one for Y, you can do the following:

  1. Bring the X, Y, data into TableMapper as columns; ND0 and ND1 respectively. (ND = Node Data)
  2. Create a LinearAxisMap for each X & Y Axis by setting the Min/Max Coordinates to 0 and 1 respectively for the data range in question.
    1. You can set the Min/Max Value explicitly   OR
    2. You can set the InputField as the output field from TableMapper and specify the NodeDataIndex (0 for ND0 and 1 for ND1).
  3. Pass the field from TableMapper and the two AxisMaps into a ScatterChart.
  4. Use the NewSeries (0, 1, -1) method specifying the corresponding node data array indices; 0 for X and 1 for Y.
    1. You can show a line by setting the ShowLine property on the ScatterChart to TRUE.
  5. On your Domain component, set the InputAxisMaps as the output from the ScatterChart for each of the dimensions.

To use the data with other charts, use the ColumnDataToScatter component after TableMapper in the same way specifying the InputField, and the AxisMaps and NodeDataIndex for each of the axis. You may then pass the field into another component.

 

@Copyright 1991-2019 Advanced Visual Systems, Inc.