-
Notifications
You must be signed in to change notification settings - Fork 28
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
Better aliases for specifying axes #665
Comments
OK, so I figured out that to use the verbose syntax I have to add function tutorial3()
coast(
region = (-90, -70, 0, 20),
proj = :Mercator,
figsize = "6i",
# frame = (axes = (:left_full, :bottom_full, :right_full, :top_full)), # error, see OP
# frame = (axes = (:left_full, :bottom_full, :right_full, :top_full),), # -BWSEN
# frame = (
# axes = (:left_full, :bottom_full, :right_full, :top_full),
# annot = :auto,
# ), # -Bpa -BWSEN
frame = (
axes = (:left_full, :bottom_full, :right_full, :top_full),
ticks = :auto,
annot = :auto,
), # -Bpaf -BWSEN
# frame = (axes = :WESN), # -BWESN -Baf
# axes = :WESN, # -BWESN -Baf
land = :chocolate,
show = true,
Vd = 1,
)
end In that case, I suggest to throw julia errors when The question is, should my proposed aliases implement |
One more suggestion for making the behaviour more consistent: Currently, when |
Thanks for the thoughts put on this. It's really useful to have the users perspective ... specially on the horribly complicated -B option 😃 I'm a bit busy right now (we'll have a GMT course starting tomorrow) so won't go through all of your points. Anyway, they were many so we probably should split this to not leave some out.
It doesn't because of an user error. I hate this and see many people falling in the same trap but have no means to avoid it. The problem is that Julia is not seeing it as a
It's frustrating but one really must follow the language rules. It works if we add a comma to make it a
Note, I've added a |
@joa-quim Thanks for the responses, that already clears up many things (for some reason it didn't occur to me that frame must be a NamedTuple!). I think I'll close this and check out master for the new aliases. I'll move the remaining point about axes defaults to a new issue. |
Here is an attempt at summarizing the following ideas. I propose the following changes to
frame
:frame
throw an error when it would construct an illegal-B
flag due to missingannot
orticks
axes
behaviour offrame
the same as the overallaxes
defaultaxes = :full
for drawing all axes with automatic annotation and ticksThis example is from the GMT tutorial session 1 no. 3 link. I tried three different ways of specifying the axes which I think should be equivalent, but one of them constructs an incorrect
-B
flag.Output from the one that doesn't work:
First, it would be good to fix the verbose case. In general, maybe it would also be nice to be able to write it like this:
I propose nine new
axes
aliases in total::full
as above:full_horizontal
==:NS
:full_vertical
==:WE
ticks_
andbare_
Let me know what you think.
The text was updated successfully, but these errors were encountered: