Skip to content
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 way to configure axis (instead of B/frame) #249

Open
leouieda opened this issue Nov 28, 2018 · 0 comments
Open

Better way to configure axis (instead of B/frame) #249

leouieda opened this issue Nov 28, 2018 · 0 comments
Labels
feature request New feature wanted

Comments

@leouieda
Copy link
Member

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature wanted
Projects
Development

No branches or pull requests

1 participant