Applies a 3-Dimensional contour layer color map onto a newly created NewXY chart.  

 

Note:

This function must be executed after the NewXY statement has sized the chart.  

 

AddContourLayer requires data for the X,Y and Z data series, which are the first three parameters.  Fourth parameter requires the count of the number elements in the Z-Axis series.  

 

An optional "Smooth" parameter can be applied so that the color transitions between each of the different levels displayed are shown as blended color gradient transition between area colors.  

 

Contour maps display the X-Axis scale below the plotting areas lower chart boundary.  Y-Axis scale is displayed just outside the plot areas right side boundary.  Z-Axis scale steps are displayed in the area between the outside boundary Y-Axis scale.  White space on the right side of a contour chart needs to provide enough pixel space to enable the Z-Scale color legend to display so that it doesn't interfere with the Y-Scale display.

 

Creating the extra space around plotted areas is created by the use of the SetPlotArea function.

 

Note:

Use with all BPV Numeric or String series that are passed to any Chart parameter.

AsSeries(...) function conditions the series so the chart function will be able to use the information contained within each of the series elements.

 

Syntax:

chart.AddContourLayer( AsSeries(XAxisSeries), _

                      AsSeries(YAxisSeries), _

                      AsSeries(ZAxisSeries), _

                      SeriesCount, _

                      [Smooth] )

 

Parameter:

Description:

XAxisSeries

X-Axis Series data.

YAxisSeries

Y-Axis Series data.

ZAxisSeries

Z-Axis Series data.

SeriesCount

The integer value specifies the number of data element values in of all three of the data series specified.  

 

Note:

Manually Sized Series:

GetSeriesSize function provides the element count.

 

Auto-Index series:

BPV: test.currentDay property reports last series element index.

IPV: instrument.bar property reports last series element index.

Smooth

Optional:  

When left out, chart will draw contours with clear line definitions between the contour colors levels creating levels that change with clear level lines.  

 

When the optional "Smooth" is added the color changes showing the different contour levels will have a blended color change transition indicating the landscape level change have a smooth contoured slope.

 

Example:

  '  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  '  CONTOUR COLOR MAP CHART
  '  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  '  Create graphing space that is 600-Pixels wide, & 300-Pixel high.
  '  Place the name "Contour Map" in the chart's window Title Bar space.
  chart.NewXY( "Contour Map", 600, 300 )
 
  '  Size the Bar Ploting area within the boundaries of the graphing
  '  image area
  '                (x-Left, x-Right,  y-Top,   y-Bottom )
  chart.SetPlotArea(    10,     100,     40,         40 )
 
  '  Create a contour map with BPV numeric series for x, y, & z axis
  chart.AddContourLayer( AsSeries( randomx ), _
                        AsSeries( randomy ), _
                        AsSeries( house2x ), iContourLevels, sSurface )
 
  '  Add Titles for X & Y Axis Scales
  '  Function places: "Temperature" near the x-Axis bottom left-side
  '  and it places "Humidity" at the bottom right as vertical text
  chart.SetAxisTitles( "Temperature", "Humidity" )
 
  '  Create & Save this graph as a chart image file.
  '  Note:  a BackSlash "\" Character is Required
  '  when using ResultsReportPath   <-- Click Link below for Details
  chart.Make( test.resultsReportPath + "\" + "Contour.png" )
  '  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Returns:

Click to Enlarge, Click to Close

Contour XY & Z Axis with Smooth Enabled

Click to Enlarge, Click to Close

Contour Smooth option omitted AddContourLayer

 

Links:

AsSeries, Make, NewXY, resultsReportPath, SetAxisTitles, SetPlotArea

See Also:

Chart

 


Edit Time: 9/25/2017 09:09:58 AM


Topic ID#: 119

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software