Plotting options and the meaning of ar.config.ploterrors - Data2Dynamics/d2d GitHub Wiki

Custom style of the plots

One convenient option for changing the default style of the plots (e.g. generated via arPlot.m) is to make a local copy of arSubplotStyle.m in the working directory and change FontSize etc. in a project-specific manner there.

What's the meaning of ar.config.ploterrors

ar.config.ploterrors can be used to control how plots are displayed. The default is ar.config.ploterror=0 which chooses plotting of errors like the data and errors are treated in fitting. Other ploterror options overwrite this setting.

Since the lenghty boolean operations should be in the code at one place, the plotting option is determined in arWhichYplot.m

The Examples/ToyModels folder contains an example ErrorPlotOptions which illustrates the different plotting options.

ar.config.ploterrors = -2

This options does not plot any error bars nor error model.

ar.config.ploterrors = -1

This option plots prediction bands as calculated by the PPL functions

ar.config.ploterrors = 0

Default option: No plot control by the user. This means that the data is displayed depending on ar.config.fiterrors and depending on availablity of the exp. error bars (ar.model.data.yExpStd).

ar.config.ploterrors = 0 & ar.config.fiterrors = -1

Here, only exp. error bars are used for fitting. Then, exp. errors are plotted as errorbars and no error band from the error model is plotted.

ar.config.ploterrors = 0 & ar.config.fiterrors = 0

Availability of exp. errors overwrites the error model. If there is an exp. error, it is displayed with an errorbar. If there is a data point without exp. error, the error model is plotted as band around the trajectory. If no exp. errors are available, only the error model is plotted as error band.

ar.config.ploterrors = 0 & ar.config.fiterrors = 1

Only the error model is used for fitting. Exp. errors (if available) are ignored. In this setting, only the error model is plotted as error band around the trajectory.

ar.config.ploterrors = 1

Data uncertainty is plotted as error bar. Depending on ar.config.fiterrors, the error can either originate from exp. errors or from the error model. In any case, it is plotted as errorbar.

ar.config.ploterrors = 2

Only error bands are plotted.

Overview

The following figure provides an overview about the different plot options. The code for producing these figures as well as further details are found in Examples/ToyModels/ErrorPlotOptions.

https://github.com/Data2Dynamics/d2d/blob/master/arFramework3/Examples/ToyModels/ErrorPlotOptions/ErrorPlotOptions.png