Next: structure() Up: MacAnova Help File Previous: strconcat()   Contents

stringplot()

Usage:
stringplot([Graph,] x,y, strings:charVec,[, add:T, graphics keyword
  phrases])
stringplot([Graph,] [x,y, strings:charVec],keys:str), str a structure
  whose component names are graphics keywords



Keywords: plotting
stringplot(x,y,strings:charVec) draws a graph, drawing charVec[i] at
position (x[i], y[i]).  x and y must be REAL vectors and charVec a
CHARACTER vector, all of the same length.  This contrasts with the
behavior of other plotting functions (except addstrings()) which allow y
to be a matrix, and permit x to be a scalar or vector of length 2 coding
equally spaced values.

It is not an error when x or y is NULL; a warning message is printed and
no plotting occurs.

For backward compatibility with earlier versions, keyword 'strings' can
be omitted (stringplot(x,y,charVec)).

If option 'dumbplot' has been set False (see subtopic
'options:"dumbplot"'), the plot will be a low resolution plot unless
'dumb:F' is an argument.

By default, each string is written centered at (x[i], y[i]).  However,
if 'justify:"l"' or 'justify:"r"' is an argument following charVec, each
string will be left or right justified.

Most of the usual graphics keywords may be used, including 'xmin',
'xmax', 'ymin', 'ymax', 'logx', 'logy', 'xlab', 'ylab', 'title',
'border' and keywords related to ticks, but not 'symbols', 'lines',
'linetype', 'thickness' or 'impulses'.  See topic 'graph_keys'.

In particular, stringplot() is most commonly used with add:T, in which
case the strings being drawn are added to the graph encapsulated in
GRAPH variable LASTPLOT.  With 'add:T', stringplot() is equivalent to
addstrings().

stringplot(Graph,x,y,strings:charVec), displays GRAPH variable Graph,
adding the string or strings in charVec, and saves the modified plot in
LASTPLOT.  Graph is not changed (unless it is LASTPLOT).

The most usual use is when both x and y are REAL scalars and charVec is
a quoted string or CHARACTER scalar to be added to a plot at coordinates
(x,y).  A typical usage would be
  Cmd> stringplot(110,20,strings:"Frequency 1 cycle/week",\
    justify:"l",add:T)

Alternatively you can use addstrings():
  Cmd> addstrings(110,20,strings:"Frequency 1 cycle/week", justify:"l")

stringplot(x,y,strings:charVec,keep:F) suppresses any change to
LASTPLOT.

stringplot(x,y,strings:charVec,show:F,add:T) suppresses immediate
display of the modified graph but updates LASTPLOT.  This is useful when
you are building a complex graph in stages using addlines(), addchars(),
addpoints(), or stringplot().  When you are done, simply type
showplot().  You can't use both show:F and keep:F.

stringplot([Graph,] keys:structure(x:x,y:y,strings:charVec [other
keyword phrases)) is equivalent to stringplot([Graph,] x:x,y:y,
strings:charVec [other keyword phrases]).  See topic 'graph_keys' for
details.

See topic 'graph_assign' for information on another way to make plots.

See topic 'graphs' for general information on plots and on variable
LASTPLOT.  See topic 'graph_keys' for information on keywords.  See
topic 'graph_files' for information on writing a graph to a file.


Gary Oehlert 2003-01-15