Skip to content

Commit

Permalink
Doc: demonstrate plotting measurements (#2523)
Browse files Browse the repository at this point in the history
It seems, the documentation didn't demonstrate how to plot measurements together with the model outputs yet.
  • Loading branch information
dweindl authored Oct 3, 2024
1 parent 8bd63f3 commit c199897
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions python/examples/example_steadystate/ExampleSteadystate.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,10 @@
"source": [
"model = model_module.getModel()\n",
"\n",
"print(\"Model name: \", model.getName())\n",
"print(\"Model parameters:\", model.getParameterIds())\n",
"print(\"Model outputs: \", model.getObservableIds())\n",
"print(\"Model states: \", model.getStateIds())"
"print(\"Model name: \", model.getName())\n",
"print(\"Model parameters: \", model.getParameterIds())\n",
"print(\"Model outputs: \", model.getObservableIds())\n",
"print(\"Model state variables: \", model.getStateIds())"
]
},
{
Expand Down Expand Up @@ -985,6 +985,21 @@
"print(\"Log-likelihood %f\" % rdata[\"llh\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": "The provided measurements can be visualized together with the simulation results by passing the `Expdata` to `amici.plotting.plot_observable_trajectories`:"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"amici.plotting.plot_observable_trajectories(rdata, edata=edata)\n",
"plt.legend(loc=\"center left\", bbox_to_anchor=(1.04, 0.5))"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit c199897

Please sign in to comment.