#### 8.2.61 tblish.examples.coplot ¶

Function: `[fig, hax] =` tblish.examples.coplot `(tbl, xvar, yvar, gvar)` ¶
Function: `[fig, hax] =` tblish.examples.coplot `(fig, tbl, xvar, yvar, gvar)` ¶
Function: `[fig, hax] =` tblish.examples.coplot `(…, OptionName, OptionValue, …)` ¶

  Conditioning plot.

  `tblish.examples.coplot` produces conditioning plots. This is a kind of plot that breaks up the data into groups based on one or two grouping variables, and plots each group of data in a separate subplot.

  tbl is a `table` containing the data to plot.

  xvar is the name of the table variable within tbl to use as the X values. May be a variable name or index.

  yvar is the name of the table variable within tbl to use as the Y values. May be a variable name or index.

  gvar is the name of the table variable or variables within tbl to use as the grouping variable(s). The grouping variables split the data into groups based on the distinct values in those variables. gvar may specify either one or two grouping variables (but not more). It can be provided as a charvec, cellstr, or index array. Records with a missing value for their grouping variable(s) are ignored.

  fig is the figure handle to plot into. If fig is not provided, a new figure is created.

  Name/Value options:

  `PlotFcn`

    The plotting function to use, supplied as a function handle. Defaults to `@plot`. It must be a function that provides the signature `fcn(hax, X, Y, …)`.

  `PlotArgs`

    A cell array of arguments to pass in to the plotting function, following the hax, x, and y arguments.

  Returns: fig – the figure handle it plotted into hax – array of axes handles to all the axes for the subplots