ploticus: proc scatterplot

## proc scatterplot | Welcome Gallery Handbook |
| Manual page for proc_scatterplot(PL)

## DESCRIPTION

Displays data points in one or two dimensions.``

## FEATURES

Clustering of duplicate data points.``

Data points may be marked with geometric point symbols, characters/text, or lines.``

User control over point shapes, colors, sizes.``

Optional labelling from data, and control of point size from data.``

## EXAMPLES

See the Gallery Scatterplot page

## VARIABLES THAT ARE SET

NVALUES = the number of in-range plottable points that were rendered.`` Note: this may be used in the legendlabel.``

## UNPLOTTABLE DATA

proc scatterplot will omit data points that are not valid or not within the plotting area.``

## PREREQUISITES

A plotting area must be set up using proc areadef and proc getdata must be executed to access or define some data.``

## MODES

2-dimensional and 1-dimensional.`` For 2-D scatterplots, both `xfield` and `yfield` should be specified.``

With 1-D scatterplots points are plotted along an imaginary line. To distribute points horizontally along Y=1 for example, `ylocation: 1` and `xfield` should be specified.`` To distribute points vertically along X=5, `xlocation: 5` and `yfield` should be specified.``

Data points may be marked with geometric point symbols and/or characters/text, or using short line segments. Characters/text may be a literal or it may come from a data field.

## MANDATORY ATTRIBUTES

For a 2-D scatterplot both `xfield` and `yfield` must be specified.`` For a 1-D scatterplot, either `xfield` or `yfield` must be specified.``

## ATTRIBUTES

xfield dfield

  Get X plotting values from this data field.`` First field is 1.`` Example: `xfield: 1`

yfield dfield

  Get Y plotting values from this data field.`` First field is 1.`` Example: `yfield: 1`

xlocation locvalue

  If specified, proc scatterplot will operate in 1-D mode along Y. The value specifies where the points will be rendered in X.``

ylocation locvalue

  If specified, proc scatterplot will operate in 1-D mode along X. The value specifies where the points will be rendered in X.``

cluster `yes` | `no`

  If yes, data will be sorted on X,Y and duplicate data points will be detected and offset slightly to show duplicity. The default is `yes`.`` Clusters may be as large as N=36 (after this, points will overlap).`` Note: If labelfield and/or sizefield are being used, clustering will work properly only when data are presorted into X,Y order.``

symbol symboldetails

  If specified, a geometric point symbol will mark data points.`` This specifies the attributes of the symbols to be used.``
  Example: `symbol: style=fill shape=circle fillcolor=red`

linelen n

  If specified, data points will be displayed as lines of length n in absolute units . The direction of the line will be appropriate for 1-D scatterplots; for 2-D it is horizontal.`` Line color, etc. may be controlled using `linedetails`.`` Example: `linelen: 0.2`

text text

  If specified, data points will be displayed using the given text, centered around the data point.`` This attribute may be used with or without a `symbol`.`` Example: `text: A`

labelfield dfield

  If specified, data points will be displayed using the contents of data field dfield, centered around the data point.`` Example: `labelfield: 4`

textdetails textdetails

  Details concerning the rendering of point labels.``
  Example: `textdetails: size=6`

linedetails linedetails

  If points are displayed using line segments (`linelen`), this attribute allows control of color, line width, etc.``

legendlabel text

  A label to be associated with the current set of points in the legend.`` proc legend must be executed later in order to render the legend. @NVALUES may be used to signify number of points rendered.``
  Example: `legendlabel: Group 4, N=@NVALUES`

verticaltext `yes` | `no`

  If `yes`, label text will be rendered vertically.`` This might be useful when labels are > 1 character long and data are close together in X.``

sizefield dfield

  Allows the size of point markers or lines to be controlled by a datafield, effectively allowing another variable to be presented.``

  If data points are marked using geometric symbols or text, the value in dfield will cause the marks to correspond to character point sizes. For example, a data value of 10 would yield a data point mark 10 points in height.`` The sizescale attribute may be used to scale the `sizefield` data appropriately.``

  If data points are marked using lines, the value in dfield will scale the length of the lines. For example, a data value of 1.0 would leave the line length unchanged, while 2.0 would double it and 0.5 would halve it.``

sizescale n

  May be used with `sizefield` when the size of data point symbols or text is being controlled by a datafield. This attribute may be used to scale the size of the point symbols to the desired range. It assumes the symbol is a circle and scales the area rather than the diameter or radius.`` A value of 1.0 would leave the size unchanged, while 2.0 would double the resulting size, and 0.5 would halve it.``

clusterdiff f

  May be used when `clustering` is being done. Two values that are within f of each other will be considered duplicates eligible for clustering. Default value is 0.01.``

clusterfact n

  May be used when `clustering` is being done. The offset that used to display duplicate data points will be multiplied by this amount. A value of 1.0 would leave the clustering offsets unchanged, while 2.0 would spread clustered points out more, and 0.5 would spread them out less.``

clustevery n

  With clustering, normally every duplicate point is offset from all the others, which may not be effective if there are large numbers of duplicate points.`` In order to reduce the clutter, this attribute may be used to offset only for every nth duplicate encountered.``
  Example: `clustevery: 5` ..would result in a point having 35 duplicates represented using 7 point marks.``

select conditional-expression

  May be used to select data rows for inclusion into the scatterplot.`` Example: `select: @3 = AA`

xrange low high

  If specified, only data points within the given plottable range in X will be shown. By default the points will be drawn only if within the plotting area.`` Example: `xrange: 0 50`

yrange low high

  If specified, only data points within the given plottable range in Y will be shown. By default the points will be drawn only if within the plotting area.`` Example: `yrange: 0 50`
  data display engine
  Copyright Steve Grubb

Markup created by unroff 1.0, `` `` June 18, 2001.