-
Notifications
You must be signed in to change notification settings - Fork 225
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
Setting frame=None gives unexpected results #1665
Comments
Ah I just saw this: I find this signature very confusing. Is there a way to provide a reasonable default (like |
@willschlitzer, do you want to have a think about the |
I like the idea of setting Admittedly, I also think |
I think this issue actually contains a bug report and a feature request. Bug reportIn the current implementation, running the following code
raises an exception Because the default value of
However, as reported in this issue, the above code doesn't raise the exception. Instead, GMT reports an error The problem is that when Lines 79 to 82 in 4186400
This is a general issue for all aliased options and should be fixed. feature requestAs discussed in above comments, when none of -A, -B, -D, -L, -T is passed, it makes sense to set |
Actually, is this a side effect of #1125? |
I may have got a generic solution for the bug fix in #1815 by modifying the
This would need to be handled in a separate Pull Request. I suppose we could modify these lines, so that Lines 79 to 82 in 4186400
|
Yes, it's related to #1125, but it isn't a side effect of #1125. As I understand the code, the behavior of
I don't think your solution in #1815 is general, because sometimes we don't use I think a more general solution is dealing with |
I think we should refactor those cases that use logic like |
Agree with using |
This isn't a solution for #1815 (comment), but elsewhere |
I'm OK with the |
Yep, I can refactor #1815 to put the logic in the |
Wait... I thought in #1665 (comment) @meghanrjones meant to not change the |
Oh right, so we're using |
Yes, I prefer case-by-base because I think the Fun opportunity to use walrus operators now that we dropped 3.7, I am a bit jealous 😄 |
Actually, I might do 2 PRs
|
I'm reopening the issue to track the above feature request. |
Description of the problem
I am just getting started with pygmt and ran through the first example in the docs.
I wanted to play a bit with the example and tried to deactivate the frame
Full code that generated the error
When I modify
to
I get this rather cryptic error
Full error message
Since
None
is the default for theframe
kwarg I am a bit confused here. Isframe=True
always required?System information
Please paste the output of
python -c "import pygmt; pygmt.show_versions()"
:The text was updated successfully, but these errors were encountered: