sbiotrellis

Plot data or simulation results in trellis plot

Syntax

trellisplot = sbiotrellis(data,groupCol,xCol,yCol)
trellisplot = sbiotrellis(data,groupCol,xCol,yCol,Name,Value)
trellisplot = sbiotrellis(data,fcnHandle,groupCol,xCol,yCol)
trellisplot = sbiotrellis(simData,fcnHandle,xCol,yCol)

Arguments

trellisplotObject returned by sbiotrellis. Use trellisplot together with the plot method to overlay trellis plots. See Description for information about the plot method.
data

A dataset containing grouped data or a groupedData object.

groupCol

String specifying a column in data that contains grouping information or an empty string '' which implies there is only one group in data.

xCol

String specifying a column in data to plot on the x-axis.

If data is groupedData, then xCol can also be an empty string '', and the x-coordinates of the data are determined by the variable specified in DATA.Properties.IndependentVariableName.

If data is dataset, then xCol cannot be empty.

yCol

String or cell array of strings specifying column(s) in data to plot on the y-axis.

fcnHandle

Function handle.

simData

SimData object.

Description

trellisplot = sbiotrellis(data,groupCol,xCol,yCol) plots each group in data as defined by the group column variable groupCol into its own subplot. The data defined by column xCol is plotted against the data defined by column(s) yCol.

trellisplot = sbiotrellis(data,groupCol,xCol,yCol,Name,Value) uses additional options specified by one or more Name,Value pair arguments that are supported by the plot command.

trellisplot = sbiotrellis(data,fcnHandle,groupCol,xCol,yCol) plots each group in data as defined by the group column variable groupCol into its own subplot. sbiotrellis creates the subplot by calling the function handle, fcnHandle, with input arguments defined by the data columns xCol and yCol. The fcnHandle cannot be empty and must be specified.

trellisplot = sbiotrellis(simData,fcnHandle,xCol,yCol) plots each group insimData into its own subplot. sbiotrellis creates the subplot by calling the function handle, fcnHandle with input arguments defined by the columns xCol and yCol. The fcnHandle can be empty ('' or []). If empty, the default time plot is created using the handle @plot.

    Tip   Use the plot method to overlay a SimData object or a dataset on an existing sbiotrellis plot. For example, plot(trellisplot, ...) adds a plot to the sbiotrellis object trellisplot. The SimData or dataset that is being plotted must have the same number of elements/groups as the trellisplot object. The plot method has the same input arguments as sbiotrellis. For an example, see Perform Population Fitting.

Examples

expand all

Create a Trellis Plot for Dataset Containing Grouped Data

Load a sample dataset.

load pheno.mat ds

Plot a trellisplot using the dataset.

sbiotrellis(ds,'ID','TIME','CONC');

Plot Using a GroupedData Object

Load a sample dataset.

load pheno.mat ds

Convert the dataset to a groupedData object.

gData = groupedData(ds);

Plot a trellisplot using the groupedData.

sbiotrellis(gData,'ID','TIME','CONC');

Plot Simulation Data

Load a sample project.

sbioloadproject('radiodecay');

Set the solver to be a stochastic solver.

m1.getconfigset('active').SolverType = 'ssa';

Set the initial amount of species x to 100.

m1.Compartments(1).Species(1).InitialAmount = 100;

Run an ensemble simulation.

sd = sbioensemblerun(m1, 12);

Plot the simulation data.

sbiotrellis(sd, '', 'Time', {'x', 'z'});

Was this topic helpful?