-
Notifications
You must be signed in to change notification settings - Fork 224
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
Add individual parameters for pen settings #1173
Comments
@willschlitzer Could you please give an example showing what the new syntax looks like? |
Sure! Here is my rough idea using
Here is the basic overview of the function:
The As I understand it, this could/would eventually become a breaking change for using the |
Could the implementation be designed to work for both parameters such as |
Also related to #1078 (comment). |
Hello @seisman @willschlitzer, my team and I found this issue interesting and we're wondering if we can work on it or if it's already claimed or discussion is still in progress. We would also appreciate any suggestions you have about another issue we can work on if this one is not ready yet |
Hello @noorbuchi! I think this issue is part of the larger debate on how PyGMT should move towards more Pythonic arguments rather than using GMT syntax. I'm going to close this issue to avoid duplication of efforts on different issues, but please check out the references issues above that discuss this. |
I started an RFC (request for comments) PR at #1239 to tackle this issue, so I'm reopening it to continue the discussion. As I mentioned in #1082 (comment), it will be great to have separate issues for the different parameters we want to have convenience classes for (e.g. Position (-D), Pen (-W), AreaFill (-G) etc). @noorbuchi (and team), you are welcome to leave review comments on #1239. It will be good for you to experience the code review side of open source too 😉 If you want, we can also open up a separate issue (once #1239 is completed) for making a new convenience class like AreaFill (-G) (refer to https://docs.generic-mapping-tools.org/latest/cookbook/features.html#specifying-area-fill-attributes). |
I think having the user need to use a separate class (as in #1239) to set the pen information outside of the plotting function overcomplicates the process. I think the best bet for overall usability is to have a few parameters (something like |
The current setup for the
pen
parameter involves passing the literal GMT string. I think that this is confusing and non-intuitive for individuals who haven't used GMT. I think that the PyGMT wrappers for GMT modules that take apen
parameter should have parameters suchpen_color
,pen_width
,pen_color
, which will then be inputs to a function that returns a GMT-formatted string that is passed to the GMT API.Are you willing to help implement and maintain this feature? Yes! I have a pretty good idea of how this would work, but want to gauge community interest before creating a pull request.
The text was updated successfully, but these errors were encountered: