# Visualization

`PumasQSP.plot_trial_prob_x`

— Function`plot(trial::AbstractTrial, prob::InverseProblem, x=get_states(prob))`

Plots the trajectories for each state of `trial`

, when point `x`

is used to provide parameter and/or initial condition values that are optimized in `InverseProblem`

`prob`

.

Vector `x`

defaults to the default values of each parameter and initial condition to be optimized, as they were specified during model definition.

`JuliaSimModelOptimizer.plot_vp_trial`

— Function`plot(vp::AbstractQSPResult, trial::AbstractExperiment; kwargs...)`

Plots the trajectories for each state of `trial`

for each set of the optimized parameters and/or initial conditions in virtual population `vp`

.

**Keyword Arguments**

`summary`

:`Bool`

, defaults to`true`

. Determines whether summary statistics of the trajectories are plotted. If`true`

, a mean trajectory is shown with a band around it representing a lower and upper quantile of the state distribution at each saved timepoint.`quantile`

: Defaults to`[0.05, 0.95]`

. A vector of two elements, corresponding to the lower and upper quantile of the distribution of each state at each saved timepoint, to be plotted if`summary == true`

.`states`

: a`Vector`

of model states, whose trajectories are plotted. Defaults to all saved states in`trial`

.`show_data`

:`Bool`

, defaults to`false`

. Determines whether data of`trial`

is also plotted. If`true`

data is plotted as a scatter plot on top of the state trajectories.

`JuliaSimModelOptimizer.plot_vp_prob`

— Function`plot(vp::AbstractQSPResult, prob::InverseProblem; kwargs...)`

Plots the state trajectories of trials that are part of `InverseProblem`

`prob`

, using each set of the optimized parameters and/or initial conditions in virtual population `vp`

. Each trial is shown in a separate subplot.

**Keyword Arguments**

`trial_names`

:`Vector`

containing the names of trials to be plotted. These trials need to be part of`prob`

.`layout`

:`Tuple{Int, Int}`

. Determines how trials are shown on the plotting window. Defaults to one trial per row. The`Tuple`

should look like`(number_of_rows, number_of_columns)`

.`summary`

:`Bool`

, defaults to`true`

. Determines whether summary statistics of the trajectories are plotted. If`true`

, a mean trajectory is shown with a band around it representing a lower and upper quantile of the state distribution at each saved timepoint.`quantile`

: Defaults to`[0.05, 0.95]`

. A vector of two elements, corresponding to the lower and upper quantile of the distribution of each state at each saved timepoint, to be plotted if`summary == true`

.`show_data`

:`Bool`

, defaults to`false`

. Determines whether data of each plotted trial is also shown. If`true`

data is plotted as a scatter plot on top of the state trajectories.

`JuliaSimModelOptimizer.confidenceplot`

— Function`julia confidenceplot(trial::AbstractExperiment, vp::AbstractQSPResult)`

Plots the trajectories for each state of `trial`

for a given confidence value of the quantile

**Keyword Arguments**

`confidence`

: Defaults to`0.8`

. A scalar value that shows the level of confidence that the obtained plot is a good fit in comparision to the actual experimental data, out of the generated virtual population members.`show_data`

:`Bool`

, defaults to`true`

, in order to show the dergee of fit with the actual data. Determines whether data of`trial`

is also plotted. If`true`

data is plotted as a scatter plot on top of the state trajectories.`states`

: a`Vector`

of model states, whose trajectories are plotted. Defaults to all saved states in`trial`

.