-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Bode plot #1051
Add Bode plot #1051
Conversation
Codecov Report
|
src/pymor/models/iosys.py
Outdated
fig = plt.gcf() | ||
ax = fig.subplots(2 * self.output_dim, self.input_dim, sharex=True, squeeze=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to fig, ax = plt.subplots(2 * self.output_dim, self.input_dim, sharex=True, figsize=(3 * self.input_dim, 4 * self.output_dim), constrained_layout=True)
?
Sounds good. Maybe it would be good to also use |
Now the default Bode plot size is Additionally, I found that |
This PR adds the
bode_plot
method toInputOutputModel
for drawing the Bode plot (with both magnitude and phases).Also, an example is added to the BT tutorial. I used the
constrained_layout
option since the suptitle is otherwise too high, but it is an experimental feature. The documentation suggests getting axes positions and setting them explicitly for reproducibility, but I guess this would have to be done for all 12 subplots...See #389.
Update: This PR also adds the
bode
method that returns magnitudes and phases used inbode_plot
.