-
Notifications
You must be signed in to change notification settings - Fork 29
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
Discussion about axes defaults #667
Comments
This is on purpose but can be changed if I manage to make it sane.
But I do agree with you that it would be nice to have a kind off appending mechanism. It's just that it's damn complicated. For example I currently have it to do
Question, should -Bf be inherited from the default or dropped because user only set the -Ba? It probably has do be dropped otherwise user would have to be forced to say noticks (an non existent option by now) when no ticks are desired. And that -Bg is clearly a bug since the default has no g. |
I have made a commit where the following policy should prevail. When using the the
Now, there are other ways of calling the Please give it some stress tests. |
Thanks, I'll check it out soon. You're right it's more complicated than I anticipated, and it's not a critical priority but thanks for looking into this. |
I have changed my feelings about some of this: I don't really like Examples: julia> basemap(region = :g, Vd = 2)
"psbasemap -Rg -JX14c/0 -Baf -BWSen -P -K > /tmp/GMTjl_tmp.ps"
julia> basemap(region = :g, frame = :auto, Vd = 2)
"psbasemap -Rg -JX14c/0 -Baf -BWSen -P -K > /tmp/GMTjl_tmp.ps"
julia> basemap(region = :g, frame = (; axes = :auto), Vd = 2)
"psbasemap -Rg -JX14c/0 -Baf -BWSen -P -K > /tmp/GMTjl_tmp.ps"
julia> basemap(region = :g, axes = :auto, Vd = 2)
"psbasemap -Rg -JX14c/0 -Baf -BWSen -P -K > /tmp/GMTjl_tmp.ps" It would be nice if we could eliminate all of these except the first option. However, it will come with some compromises. Some ideas for GMT -B:
What it might look like: basemap(region = :g, Vd = 2)
# "psbasemap -Rg -JX14c/0 -Baf -BWSen -P -K > /tmp/GMTjl_tmp.ps"
basemap(region = :g, frame = :auto, Vd = 2)
# Erorr, frame must be one of :full, :WSen, ...
basemap(region = :g, frame = :full, axes = (; annot = false), Vd = 2)
# "psbasemap -Rg -JX14c/0 -Bpa0 -BWSEN -P -K > /tmp/GMTjl_tmp.ps"
# Current syntax: basemap(region = :g, frame = (; axes = :full, annot = false), Vd = 2)
# This one could be controversial
basemap(region = :g, title = "My Title")
# Error, title is not a valid keyword arg
basemap(region = :g, frame = (; title = "My Title"))
# Note that this already works
basemap(region = :g, frame = (; draw = :full, title = "My Title"))
# Instead of basemap(region = :g, frame = (; axes = :full, title = "My Title"))
# to avoid confusion with the actual "axes settings" in axes = (; ... )
Some of the confusion for me came from the fact that GMT splits -B options into "frame settings" and "axes settings", but the first "frame setting" is -Baxes 😄 To simplify the parser and make cross-referencing GMT docs easier, I think it would be best to split up the two kinds of B-options here as well. And renaming the option for "which of the axes should be drawn" from |
Follow up from #665 , hopefully this can be a bit more organised :)
First: thanks for this package! I'm moving as much of my data processing to Julia as possible, and it's so convenient to make nice maps from the Julia shell.
The default behaviour of
axes
seems to depend on theframe
option. Example:In the second case, there is no
-BWSen
so now all axes are annotated. With the introduction of #666 and similar aliases, we would already have e.g.frame = :full
for doing that. So maybeframe = (kwargs...)
where kwargs does not containaxes
should also produce the-BWSen
behaviour?The text was updated successfully, but these errors were encountered: