You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Better way to configure axis (instead of B/frame) #249
Currently, tickmarks, titles, axis labels, gridlines and others are all set using the frame argument (-B ). This leads to huge unreadable strings and sometimes even to multiple entries for frame (which we handle via lists right now).
There should be a better way of doing this. In GMT.jl, they have added an axis function that creates the string for you. Alternatively, we could add set_xlabel style methods to gmt.Figure. I don't think this will work because that's not how GMT handles things. We would have to hold on to these arguments and pass them along to a later module call.
What we could do is add xlabel, title etc arguments to gmt.Figure which would be converted to one or more -B entries. They would be stored and passed along to the first method call. The same could be done for projection, region, X and Y. One drawback is that the argument list for Figure would get quite large and the complexity of creating a new figure would also increase. Another drawback is the our Figure isn't really a figure. GMT draws things on a canvas and so every single plotting command can have it's own axes.
The best option might be to have a Frame/Axes class or function that converts sane arguments (xlabel, title, grid) into the correct -B. We could optionally allow the frame argument to be a dictionary, which we would pass along to our function/class.
Activity
seisman commentedon Apr 15, 2026
We have implemented the
Frame/Axisclasses for frame settings. The progress will be tracked in issue #4588.I'm closing this eight-year-old issue.