Search Locate Previous Next Contents

ch.NewCell – advance to next cell in trellis

When you have defined the chart area as a rectangular array of cells (trellis) with ch.Set 'Trellis' you move to the next cell with:

ch.NewCell

Most of the chart settings are left as they were by this call. For a full reset, call ch.Reset or set the trellis style to ‘reset’.

A typical use of this function would be to plot data from a series of planes of a high-dimensional array:

ch.Set 'trellis' (1†½mat)
:for plane :in ¼1†½mat
  ch.NewCell
  ch.Plot mat[plane;;]
:endfor

You might like to set the Y-axis range outside the loop to ensure comparability between the plots as Rain will auto-range each plot individually by default. Note that for the simple case (as shown above) when you only plot one chart in each cell, you can set the trellis style to ‘skip’ to have RainPro move on to the next cell automatically. See the tutorial on trellis plots for more examples.

See also ...
TrellisStyle – trellis style


Continue to: ch.NewPage – request a new page
© Copyright Causeway Graphical Systems Ltd 2003