plot_individual_predictions#

pharmpy.modeling.plot_individual_predictions(model, predictions, individuals=None)[source]#

Plot DV and predictions grouped on individuals

Parameters:
  • model (Model) – Previously run Pharmpy model.

  • predictions (pd.DataFrame) – One column for each type of prediction

  • individuals (list) – A list of individuals to include. None for all individuals

Returns:

alt.Chart – Plot

Examples

from pharmpy.modeling import load_example_model, plot_individual_predictions
from pharmpy.tools import load_example_modelfit_results

model = load_example_model("pheno")
res = load_example_modelfit_results("pheno")
plot_individual_predictions(model, res.predictions, individuals=[1, 2, 3, 4, 5])