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
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.
The text was updated successfully, but these errors were encountered:
Description of the desired feature
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 forframe
(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 addset_xlabel
style methods togmt.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 togmt.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 forprojection
,region
,X
andY
. One drawback is that the argument list forFigure
would get quite large and the complexity of creating a new figure would also increase. Another drawback is the ourFigure
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 theframe
argument to be a dictionary, which we would pass along to our function/class.The text was updated successfully, but these errors were encountered: