-
Notifications
You must be signed in to change notification settings - Fork 33
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 separated component field plotting #132
Conversation
Looks great! |
Good idea! I will take a look into that |
I see to possible way:
I prefer the first one since it will enforce people to "learn" to use the new function. What do you think? |
Now, with the last commits, the function should be backward compatible! |
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.
Looks amazing! Just some minor tweaks and then we can merge!
Co-authored-by: Helge Gehring <[email protected]>
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.
Looks amazing, I'm soo close to approving!
femwell/maxwell/waveguide.py
Outdated
boundaries: bool = True, | ||
colorbar: bool = False, | ||
direction: Literal["x", "y"] = "x", | ||
title: str = "E", |
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.
title: str = "E", | |
title: Optional[str] = None, |
That way we could use field (if it's a Literal) as the title in case the user doesn't define anything?
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.
just as a small extra: when you pass it on to the new function, could you add there for the title
title = field if title is None else title
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.
I am not sure about this one. If the user does not want to add a title, should we really enforce one?
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.
I think like this we get titles for all the fields in case we don't set anything ,right?
What do you think? I think once we add that we're done? |
Solve the issue #90 from @lukasc-ubc
Implement
plot_component
to allow the user to set the field, the direction and the part (real, imaginary or absolute value) to be plotted.