Plot model outputs and observed data points

Syntax


plot <flag 1> <flag 2> …

   ‘<dataset name 1 : column 1>’ ‘<dataset name 2 : column 2>’ …

   <model output 1> <model output 2> …



Description


The PLOT command is used to create 2-D line plots of model outputs and observed data, and to create interactive plots using sliders.  In its simplest form, the PLOT command can be used to plot model outputs which were previously included in a PREPARE statement.  The following statement, for example, creates three line plots: x vs t, y vs t and z vs t.


       plot x y z


Optional flags can be used to modify the plot in various ways:



@logx

Use logarithmic scaling on x axis

@logy

Use logarithmic scaling on y axis

@xmin=<value>

Set the x axis minimum to the specified value

@xmax=<value>

Set the x axis maximum to the specified value

@ymin=<value>

Set the y axis minimum to the specified value

@ymax=<value>

Set the y axis maximum to the specified value

@title=’<string>’

Use the specified string for the plot title

@xlabel=’<string>’

Use the specified string for the x axis label

@ylabel=’<string>’

Use the specified string for the y axis label

@xvar=’<var name>’

Use the specified model variable as the independent variable

@interactive

Include the slider table and model output/parameter check lists on the plot window to enable interactive exploration of model behavior

@param=<const name>

Specify any parameters to be included on the slider table by default


In addition, data sets specified using the DATA command can be superimposed on model predictions as scatter plots by including the data set name and column as separate entries in the PLOT command.  For example, the following PLOT command will include the column named “XOBS” from the dataset named “obsdata” loaded via a previous DATA command:


   plot x ‘obsdata:xobs’


Note that the independent variable values for ‘xobs’ are taken from the column corresponding with the model variable ‘t’ in the associated data command.


When a model is run directly (i.e, without using a script file), an interactive plot is created at the conclusion of the run.  The interactive plot window include checklists from which model outputs may be added to or removed from the plot, and fro which model constants may be added to or removed from the sliders table.  The @interactive and @param flags of the PLOT command allow configuration of interactive plots from within CMD scripts.  To specify that the plot produced by the PLOT command be interactive, simply include the @interactive flag.  To initialize the sliders table with specific parameters, include the name of each desired parameter using the @param flag.

Example


plot @interactive @xvar=vtheta vthetadot rdot r theta @param=k @param=l