Skip to content

Commit 0c6aac5

Browse files
Modify uncertainty weight and fit plotting functions.
1 parent e9b4edd commit 0c6aac5

File tree

3 files changed

+269
-136
lines changed

3 files changed

+269
-136
lines changed

examples/7_uncertainty_characterization.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,20 @@ def example_uncertainty_characterization():
8181
legend_kw={"ncol": 3},
8282
)
8383

84-
# Plot: Magnitude response of uncertainty weight frequency response and overbounding
85-
# fit
86-
dkpy.plot_magnitude_response_uncertainty_weight(
87-
response_weight_left,
88-
response_weight_right,
89-
omega,
90-
weight_left,
91-
weight_right,
84+
# Plot: Magnitude response of left uncertainty weight frequency response and fit
85+
_, ax, _ = dkpy.plot_magnitude_response_uncertainty_weight(
86+
response_weight_left, omega, ylabel="$W_{L}$"
87+
)
88+
dkpy.plot_magnitude_response_uncertainty_weight_fit(
89+
weight_left, omega, ax=ax, ylabel="$W_{L}$"
90+
)
91+
92+
# Plot: Magnitude response of right uncertainty weight frequency response and fit
93+
_, ax, _ = dkpy.plot_magnitude_response_uncertainty_weight(
94+
response_weight_right, omega, ylabel="$W_{R}$"
95+
)
96+
dkpy.plot_magnitude_response_uncertainty_weight_fit(
97+
weight_right, omega, ax=ax, ylabel="$W_{R}$", plot_kw={"linestyle": "--"}
9298
)
9399
plt.show()
94100

examples/8_aircraft_actuator_uncertainty_characterization.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,12 @@ def example_aircraft_uncertainty_characterization():
5555
legend_kw={"ncol": 3},
5656
)
5757

58-
# Plot: Magnitude response of uncertainty weight frequency response and overbounding
59-
# fit
60-
dkpy.plot_magnitude_response_uncertainty_weight(
61-
response_weight_left,
62-
response_weight_right,
63-
omega,
64-
weight_left=weight_left,
65-
hz=True,
58+
# Plot: Magnitude response of left uncertainty weight frequency response and fit
59+
_, ax, _ = dkpy.plot_magnitude_response_uncertainty_weight(
60+
response_weight_left, omega, ylabel="$W_{L}$"
61+
)
62+
dkpy.plot_magnitude_response_uncertainty_weight_fit(
63+
weight_left, omega, ax=ax, ylabel="$W_{L}$", plot_kw={"linestyle": "--"}
6664
)
6765
plt.show()
6866

0 commit comments

Comments
 (0)