ACON
Home/Topics |
Commands
The volume estimation commands include:
Plot Histogram,
Plot Labels,
Plot Linear Regression,
Plot Lines,
Plot Points,
Plot Shaded, and
Plot Box Whisker.
This command will plot a histogram. The current Data_Viewport
will be used. See also Data Histogram
which has more options and control over the resultant plot.
- There are 7 or more parameters:
- width - an optional value giving the width of each histogram bar in x axis units.
offset - an optional value giving the offset of each histogram bar in x axis units
relative to the x value.
x vector - a vector containing the x values to plot.
y vector- a vector containing the y data to plot.
OR
xy matrix - a matrix containing the x axis and y axis values to plot. If this matrix contains more than
2 columns then each successive column is considered to be a series of y values to be plotted against
the original 1st column x values.
title - an optional text string to be used as the title.
xlabel - an optional text string to be used as the x axis label.
ylabel - an optional text string to be used as the y axis label.
xmin - the x axis minimum to be used for the datawindow.
xmax - the x axis maximum to be used for the datawindow.
ymin - the y axis minimum to be used for the datawindow.
ymax - the y axis maximum to be used for the datawindow.
fill colour name(s) - an optional character string giving the colour to use when shading the histogram bars.
Alternately, this may be a character matrix which, if it contains the same number of elements as the x vector,
will specify the colour of each bar uniquely. A 3rd possibility is that the number of elements in this character
matrix matches the number of y columns supplied.
plot_histogram([width,][offset,] xvec,yvec, [title,][x label,][y
label,]xmin,xmax,ymin,ymax[,"fill colour"]);
plot_histogram([width,][offset,] xymatrix,title, xmin,xmax,ymin,ymax [,fill colour char matrix]);
x =1 2 3 4
y = 10 15 18 13
plot_histogram(x,y,"Example",0,10,0,20)
This command will plot a matrix of data as data points
and label the values. The current Data_Viewport and projection
will be used.
- There are 7 or more parameters:
- x vector - a vector containing the x data values to plot.
y vector - a vector containing the y data to plot.
z vector - a vector containing the z data labels to plot.
OR
xyz matrix - an n x 3 matrix of data.
title - an optional text string to be used as the title.
xlabel - an optional text string to be used as the x axis label.
ylabel - an optional text string to be used as the y axis label.
xmin - the x axis minimum to be used for the data window.
xmax - the x axis maximum to be used for the data window.
ymin - the y axis minimum to be used for the data window.
ymax - the y axis maximum to be used for the data window.
plot_labels(xvec,yvec,zvec,title,xmin,xmax,ymin,ymax);
plot_labels(xyzmat,title,xmin,xmax,ymin,ymax);
x =1 2 3 4
y = 10 15 18 13
z = 10 15 18 13
plot_labels(x,y,z,"Example",0,10,0,20)
This command will plot a linear regression of x,y
data as data points and label the values. The current Data_Viewport
and projection will be used.
- There are 2 or more parameters:
- x vector - a vector containing the x data to plot.
y vector - a vector containing the y data to plot.
title - an optional text string to be used as the title.
xlabel - an optional text string to be used as the x axis label.
ylabel - an optional text string to be used as the y axis label.
startlabel - an optional numeric value of the label for the 1st data point in the series.
nlabels - an optional number of labels to plot, if negative then this number is the last n values to label.
nresiduals - an optional number of residuals to show, if negative then this number is the last n residuals to show.
xmin - an optional x axis minimum to be used for the data window.
xmax - an optional x axis maximum to be used for the data window.
ymin - an optional y axis minimum to be used for the data window.
ymax - an optional y axis maximum to be used for the data window.
xlabelinc - the optional x axis label increment.
ylabelinc - the optional y axis label increment.
xticinc - the optional x axis tic increment.
yticinc - the optional y axis tic increment.
LeftEdge - the optional left edge labelling flag (default 1).
RightEdge - the optional right edge labelling flag (default 0).
BottomEdge - the optional bottom edge labelling flag (default 1).
TopEdge - the optional top edge labelling flag (default 0).
plot_linear_regression(xvec,yvec[,title,startlabel,nlabels, nresiduals,xmin,xmax,ymin,ymax]);
x =1 2 3 4
y = 10 15 18 13
plot_linear_regression(x,y,"test",70,-2,4,0,5,0,20)
This command will plot a matrix of data as lines
using a common set of x axis coordinates. The Data window will
be computed automatically or may be specified. The current Data_Viewport
and Projection will be used. Line_Types() 0,1... will be used
for each line drawn, and repeated as necessary, unless a colourname matrix is supplied.
- There are up to 10 parameters:
- x vector - vector of x axis values to plot.
y vector OR y matrix - vector or matrix containing the y data to plot.
If a matrix is the 1st argument (no x vector) then the 1st column of the matrix is assumed to be the x vector,
and the remaining columns, the y vectors.
title - an optional text string to be used as the title.
xlabel - an optional text string to be used as the x axis label.
ylabel - an optional text string to be used as the y axis label.
xmin - optional x axis minimum to be used for the data window.
xmax - optional x axis maximum to be used for the data window.
ymin - optional y axis minimum to be used for the data window.
ymax - optional y axis maximum to be used for the data window.
colourname matrix - optional character matrix defining the colour to be used for each of the lines, in lieu of changing line types.
plot_lines(xvec,yvec[,title][,xmin,xmax,ymin,ymax]);
plot_lines(xvec,matrix[,title][,xmin,xmax,ymin,ymax])
plot_lines(matrix[,title][,xmin,xmax,ymin,ymax] [,colour names matrix])
x = 1 2 3 4
m = shape(4 5,seq(1,20))
plot_lines(x,m,"Example")
This command will plot a matrix of data as data points
using a common set of x axis coordinates. The Data window will
be computed automatically or may be specified. The current Data_Viewport
and Projection will be used. Marker_Types() 0,1... will be used
for each set of data points drawn.
- There are 1 or more parameters:
- x vector - the vector of x axis values to plot.
y vector OR y matrix - a vector or matrix containing the y data to plot.
If a matrix is the 1st argument (no x vector)
then the 1st column of the matrix is assumed to be the x vector,
and the remaining columns are assumed to be the y vectors.
title - an optional text string to be used as the title.
xlabel - an optional text string to be used as the x axis label.
ylabel - an optional text string to be used as the y axis label.
xmin - optional x axis minimum to be used for the data window.
xmax - optional x axis maximum to be used for the data window.
ymin - optional y axis minimum to be used for the data window.
ymax - optional y axis maximum to be used for the data window.
xlabelinc - optional x axis label increment.
ylabelinc - optional y axis label increment.
xtic - optional x axis tic increment.
ytic - optional y axis tic increment.
left - the optional flag to indicate drawing of the left axis.
right - the optional flag to indicate drawing of the right axis.
bottom - the optional flag to indicate drawing of the bottom axis.
top - the optional flag to indicate drawing of the top axis.
colour matrix - the optional matrix of colour names to use in colour each data point.
This must have the same number of rows as there are data points or
the same number of rows as there are columns of y vectors. If the number of colours
is equal to both the number of rows of data, and the number of y columns a warning
is issued, and the colours are applied to each row of data.
plot_points(xvec,yvec[,title][,xmin,xmax,ymin,ymax]);
plot_points(xvec,matrix[,title][,xmin,xmax,ymin,ymax])
plot_points(matrix[,title][,xmin,xmax,ymin,ymax] [,xlabelinc,ylabelinc,xtic,ytic] [,colour matrix])
m = shape(4 5,seq(1,20))
plot_points(m,"Example")
This command will plot a matrix of data as a shaded
surface using a user-defined set of axis coordinates. The x,y values
and the data window will be automatically generated using the axis limits
specified. The contents of the matrix are used as the z values to contour.
The 1st element of the matrix [1;1] corresponds to the lower left corner of
the plot, while the last element of the matrix [n;m] corresponds to the upper
right corner of the plot. The current Data_Viewport will be used. If there is
a data_contour_Levels or data_contour_ramp defined, it will use those levels
as the default when no colour scale parameter is supplied. If they are not
yet defined, the default will be scaling 3 (20 colour ramp)
- There are up to 17 parameters:
- matrix - a matrix containing the z data to plot.
title - an optional text string to be used as the title.
xlabel - an optional text string to be used as the x axis label.
ylabel - an optional text string to be used as the y axis label.
xmin - the optional x axis minimum to be used for
the data window.
xmax - the optional x axis maximum to be used for
the data window.
ymin - the optional y axis minimum to be used for
the data window.
ymax - the optional y axis maximum to be used for
the data window.
xlabelinc - the optional x axis label increment.
ylabelinc - the optional y axis label increment.
xticinc - the optional x axis tic increment.
yticinc - the optional y axis tic increment.
LeftEdge - the optional left edge labelling flag (default 1).
RightEdge - the optional right edge labelling flag (default 0).
BottomEdge - the optional bottom edge labelling flag (default 1).
TopEdge - the optional top edge labelling flag (default 0).
colour scale flag - the type of colour scaling to
use. 0 = default data_contour_ramp() colours; 1 = 5 level red,
white, blue colour ramp; 2 = 20 level red, white, blue colour
ramp; 3 = 20 level colour spectrum ramp; 4 = 20 level purple,
blue colour ramp.
plot_shaded(matrix[,title][,xmin,xmax,ymin,ymax,xlabelinc,ylabelinc,xticinc,yticinc,
leftedge,rightedge,bottomedge,topedge,colour scale flag])
m = shape(4 5,seq(1,20))
print(m)
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
plot_shaded(m,"test",0,7.0,0,22,1,5,.2,1,1,0,1,0,1)
This command will plot a series of x,y points as a box-whisker graph
for each group of x axis values. The Data window will
be computed automatically or may be specified. The current Data_Viewport
will be used with a NIL projection. The number of box-whisker graphics produced
within the viewport is calculated from the minimum difference
between the x axis values supplied.
The percentile limits for the whiskers and box are an optional parameter.
The default percentiles are 0.1 0.25 0.5 0.75 and 0.9.
- There are 1 or more parameters:
- x vector - vector of x axis values to plot.
y vector - vector containing the matching y values.
or optionally
matrix - matrix containing the x,y data to plot, assumed to be in the 1st 2 columns.
percentile vector - optional numeric vector defining the percentiles for the whisker and box
to be used for each of the groups of data (0 > x < 1).
title - an optional text string to be used as the title.
xlabel - an optional text string to be used as the x axis label.
ylabel - an optional text string to be used as the y axis label.
xmin - optional x axis minimum to be used for the data window.
xmax - optional x axis maximum to be used for the data window.
ymin - optional y axis minimum to be used for the data window.
ymax - optional y axis maximum to be used for the data window.xlabel - optional x axis label increment.
ylabel - optional y axis label increment.
xtic - optional x axis tic increment.
ytic - optional y axis tic increment.
leftaxis - optional flag to indicate the left axis should be drawn.
rightaxis - optional flag to indicate the left axis should be drawn.
bottomaxis - optional flag to indicate the left axis should be drawn.
topaxis - optional flag to indicate the left axis should be drawn.
box width - optional with of the box in NDC's e.g. mm(5).
min # points - optional number of data points below which only the data points will be shown.
plot mean - optional flag to indicate that the mean should be plotted.
plot_box_whisker(xvec,yvec[,percentiles] [,title] [,xmin,xmax,ymin,ymax]);
plot_box_whisker(matrix[,percentiles][,title] [,xmin,xmax,ymin,ymax])
x = 1 1 1 1 1 2 2 2 2 2.
y = 1 2 2 3 6 4 4 5 5 6.
plot_box_whisker(x,y,.05 .25 .5 .75 .95,"Example")
ACON
Home/Topics |
Commands
|