Skip to content

Commit

Permalink
Plotting for EGU Poster
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinpfoertner committed Apr 26, 2024
1 parent 4063d6f commit 75adeb8
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions experiments/0000_cpu_stationary_1d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
" y_dts: ArrayLike | None = None,\n",
" noise_dts: RandomVariableLike | None = None,\n",
" show_u_label: bool = True,\n",
" show_legend: bool = True,\n",
" show_axis_labels: bool = True,\n",
"):\n",
" cond_events_str = \", \".join(_build_cond_events_str(conditioned_on))\n",
"\n",
Expand All @@ -101,7 +103,7 @@
" color=\"C0\",\n",
" label=fr\"$\\mathrm{{u}} {cond_events_str}$\" if show_u_label else None,\n",
" )\n",
" \n",
"\n",
" # True Solution\n",
" if bvp.solution is not None:\n",
" bvp.solution.plot(\n",
Expand Down Expand Up @@ -176,8 +178,24 @@
" label=r\"$(\\bm{X}_{\\mathrm{DTS}}, \\bm{y}_{\\mathrm{DTS}})$\",\n",
" )\n",
"\n",
" cpu.adjust_xaxis(ax)\n",
" cpu.adjust_tempaxis(ax.yaxis)\n",
" if show_axis_labels:\n",
" cpu.adjust_xaxis(ax)\n",
" cpu.adjust_tempaxis(ax.yaxis)\n",
" else:\n",
" ax.tick_params(\n",
" axis=\"x\",\n",
" which=\"both\",\n",
" bottom=False,\n",
" top=False,\n",
" labelbottom=False,\n",
" )\n",
" ax.tick_params(\n",
" axis=\"y\",\n",
" which=\"both\",\n",
" left=False,\n",
" right=False,\n",
" labelleft=False,\n",
" )\n",
"\n",
" # ax.set_ylabel(\n",
" # r\"Temperature (\\unit{\\degreeCelsius})\",\n",
Expand All @@ -186,8 +204,8 @@
" # rotation=0,\n",
" # labelpad=0,\n",
" # )\n",
"\n",
" ax.legend()\n",
" if show_legend:\n",
" ax.legend()\n",
"\n",
"\n",
"def plot_pred_belief(\n",
Expand Down Expand Up @@ -231,7 +249,7 @@
" color=\"C0\",\n",
" label=fr\"$-\\kappa \\Delta \\mathrm{{u}} {cond_events_str}$\" if show_u_f_label else None,\n",
" )\n",
" \n",
"\n",
" # True Right-Hand Side\n",
" bvp.pde.rhs.plot(\n",
" ax,\n",
Expand All @@ -243,7 +261,7 @@
" else r\"^\\star$\"\n",
" ) if show_u_f_label else None,\n",
" )\n",
" \n",
"\n",
" # PDE Observations\n",
" if X_pde is not None:\n",
" if u is not None:\n",
Expand Down Expand Up @@ -278,7 +296,7 @@
" linestyle=\"--\",\n",
" label=r\"$\\bm{X}_{\\mathrm{PDE}}$\" if i == 0 else None,\n",
" )\n",
" \n",
"\n",
" cpu.adjust_xaxis(ax)\n",
" cpu.adjust_q_dot_V_axis(ax.yaxis)\n",
"\n",
Expand Down Expand Up @@ -675,7 +693,7 @@
" X_pde=X_pde,\n",
" show_u_f_label=False,\n",
" )\n",
" \n",
"\n",
"experiment_utils.savefig(\"01_simplified_dbc_02_cond_pde_dbc\")"
]
},
Expand Down Expand Up @@ -1711,6 +1729,8 @@
" X_dts=X_dts,\n",
" y_dts=y_dts,\n",
" noise_dts=noise_dts,\n",
" show_legend=True,\n",
" show_axis_labels=True,\n",
" )\n",
"\n",
"experiment_utils.savefig(\"03_full_03_cond_pde_nbc_stat_dts_u\")"
Expand Down

0 comments on commit 75adeb8

Please sign in to comment.