|
145 | 145 | "\t\tif method == rtsdiff:\n", |
146 | 146 | "\t\t\tfig, axes = evaluate.plot(x, dt, x_hat, dxdt_hat, x_truth, dxdt_truth, show_error=False)\n", |
147 | 147 | "\t\t\taxes[1].text(0.05, 0.95, f\"RMSE =\\n $R^2$ =\", # Show performance metrics for both methods manually\n", |
148 | | - " transform=axes[1].transAxes, fontsize=15, color='black', verticalalignment='top')\n", |
| 148 | + "\t\t\t\ttransform=axes[1].transAxes, fontsize=15, color='black', verticalalignment='top')\n", |
149 | 149 | "\t\t\taxes[1].text(0.16, 0.95, f\"{rms_dxdt:.2f}\\n{R_sqr:.2g}\",\n", |
150 | | - " transform=axes[1].transAxes, fontsize=15, color='red', verticalalignment='top', linespacing=1.5)\n", |
| 150 | + "\t\t\t\ttransform=axes[1].transAxes, fontsize=15, color='red', verticalalignment='top', linespacing=1.5)\n", |
151 | 151 | "\t\t\tw = len(f\"{R_sqr:.2g}\")\n", |
152 | 152 | "\t\telse:\n", |
153 | 153 | "\t\t\taxes[0].plot(t, x_hat, color='green', label=\".\") # need dummy labels here to generate more handles\n", |
|
157 | 157 | "\t\t\thandles, labels = axes[1].get_legend_handles_labels()\n", |
158 | 158 | "\t\t\taxes[1].legend(handles, [labels[0], r\"est. $\\hat{\\frac{dx}{dt}}$ via RTS\", r\"est. $\\hat{\\frac{dx}{dt}}$ via Robust\"])\n", |
159 | 159 | "\t\t\taxes[1].text(0.26 - 0.012*(6 - w), 0.95, f\"{rms_dxdt:.2f}\\n{R_sqr:.2g}\",\n", |
160 | | - " transform=axes[1].transAxes, fontsize=15, color='green', verticalalignment='top', linespacing=1.5)\n", |
| 160 | + "\t\t\t\ttransform=axes[1].transAxes, fontsize=15, color='green', verticalalignment='top', linespacing=1.5)\n", |
161 | 161 | "\n", |
162 | 162 | "\tfig.suptitle(f\"{problem.__name__}\", fontsize=28)" |
163 | 163 | ] |
|
0 commit comments