-
Notifications
You must be signed in to change notification settings - Fork 234
Figure.logo: Add parameters position/width/height to specify logo position and dimensions #4014
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
Conversation
pygmt/src/logo.py
Outdated
| raise GMTInvalidInput(msg) | ||
|
|
||
| # Default position at the plot origin. | ||
| if position is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force the default position to x0/0 if position is not given.
| [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ | ||
| **+w**\ *width*\ [**+j**\ *justify*]\ [**+o**\ *dx*\ [/*dy*]]. | ||
| Set reference point on the map for the image. | ||
| position |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, position accept a Position object. I'm debating if we should support a tuple or an anchor code:
position=(0, 2): equivalent toposition=Position((0, 2))and is converted to"x0/2"position="BL": equivalent toposition=Position("BL")and is converted to"jBL".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented in 9b7f0f5.
|
@GenericMappingTools/pygmt-maintainers Please give this PR a final review. Plan to merge in 24 hours if no further comments. |
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
The
logomodule's-Doption has the following syntax:[g|j|J|n|x]refpoint[+jjustify][+odx[/dy]]is common to GMT embellishments and use thePositionclass+h:height+w:widthPreview: https://pygmt-dev--4014.org.readthedocs.build/en/4014/api/generated/pygmt.Figure.logo.html
Related to #4165.