setChart

string TitleX1, string TitleX2, string TitleY ] )


Chart


An integer between 1 and 100 specifying the ID of the chart to be changed.


Type


An enumerated integer specifying the type of the graph to be set. Must be one of the following values:


GR_BAR – data will be plotted in form of bar histogram. Measurement histograms illustrate the distribution of object population over a measurement range. The histogram's Xscale identifies the parameter's range (from its minimum value to its maximum value), and the Yscale measures the number of objects within each measured interval. Data values in the bar histogram are represented by vertical bars.


GR_LINE – data will be plotted in form of line histogram. Analogous to the bar histogram except that data values in the line histogram are represented by connected straightline segments.


GR_PIE – data will be plotted in form of round diagram. The round diagram displays the distribution of the selected parameter among the measured parameter's range. The segments of the diagram correspond to the percentage of objects within each measured interval.


GR_3D – plots two measurements in form of 3Dhistogram, where the X1axis represent the value of the first parameter, the X2axis represents the value of the second parameter, and the Yaxis measures the number of objects with the values of both parameters falling within corresponding intervals. Data values in the bar histogram are represented by vertical pillars.


GR_SCATTER – plots two measurements against each other. Scattergrams are used to illustrate a correlation between two measurements. ImageWarp displays the scattergram along with its correlation factor and the bestfit line drawn through the points.


GR_MULTI – plots the histograms of several measurements next to each other in a 3Dform. Xaxis represents the measured parameter, the X2axis serves as a divider between different data series, and the Yaxis measures the number of objects within each interval. Data values in the multihistogram are represented by vertical pillars.


Classes1


An integer between 2 and 50 specifying the number of intervals into which the measured parameter's range will be divided. This corresponds to the number of classes displayed along the Xaxis of the histogram graphs or the number of segments in the Pie diagram.

Default value: 8


Classes2


An integer between 2 and 50 specifying the number of intervals into which the range of values of the second parameter will be divided. This corresponds to the number of classes displayed along the X2axis of the 3Dhistogram.

Default value: 8


Fit


A boolean integer specifying weather the bestfit line should be plotted on the Scattergram.

Default value: TRUE


Power


An integer between 1 and 10 specifying the power of the polynom to be used to build the bestfit line for the Scattergram.

Default value: 1


Gauss


A boolean integer specifying weather a Gaussian curve will be plotted on the bar or line histogram chart. The Gaussian represents a normal distribution with the same mean and standard deviation that the plotted measurement parameter has.

Default value: FALSE


Legend


A boolean integer specifying weather the legend will be displayed next to the graph. A legend is a box that identifies colors assigned to different classes on the Pie diagram.

Default value: TRUE


TitleX, TitleY…


Strings specifying descriptive text displayed along the corresponding axes. Default values for these arguments are determined by the selected type of the graph.


ERR_OK


The flag set if successful.


ERR_FAILED


The flag set if failed.



This set of statements measures objects on a sample image and displays a 3Dhistogram of two measured parameters and then changes the chart type to the Scattergram:


SelectParam("Area","Perim","DCircle","DMin","DMax")

grabim(1)

threshunimod(1,1,0,1)

scrap(1,1,50,400,1)

measobjects(1,1,"")

setChartAttr(GR_3D,8,5)

createChart(1,"","Area",0, "DMin",0)

wait(2000)

setChart (1, GR_SCATTER)

