-
Notifications
You must be signed in to change notification settings - Fork 254
DOC: Add gallery example for PyGMT logo #4715
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
1893d97
Add gallery example for PyGMT logo
yvonnefroehlich 7a18809
Add comments
yvonnefroehlich 2220886
Merge branch 'main' into add-gallery-pygmtlogo
yvonnefroehlich 3beb24a
Fix projection argument
yvonnefroehlich 9e1529e
Adjust region, projection and background color
yvonnefroehlich 49bfc61
Adjust size and background color
yvonnefroehlich 624be9d
Use 'width' and 'height' parameters
yvonnefroehlich 6f29d3d
Adjust background color
yvonnefroehlich 0829fcf
Change thumbnail image
yvonnefroehlich d053a1f
Improve intro text
yvonnefroehlich cc2c342
Use Frame parameter class
yvonnefroehlich db886f8
Fix line length
yvonnefroehlich 3514aea
Adjust line length
yvonnefroehlich f475c68
Improve intro text
yvonnefroehlich a039543
Improve intro text
yvonnefroehlich d291294
Explain parameter 'width' and 'height'
yvonnefroehlich c4af57a
Fix highlighting
yvonnefroehlich c1630f8
Merge branch 'main' into add-gallery-pygmtlogo
yvonnefroehlich 4312934
Adjust word
yvonnefroehlich beba8e4
Remove background of desgin idea
yvonnefroehlich 377c607
Merge branch 'main' into add-gallery-pygmtlogo
yvonnefroehlich 9ebd2cb
Add links across the gallery examples for the two logos
yvonnefroehlich 027caf1
Shorten formulation
yvonnefroehlich 1e83738
Remove period
yvonnefroehlich d03d787
Set thumbnail image to first figure
yvonnefroehlich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| """ | ||
| PyGMT logo | ||
| ========== | ||
| Beside the GMT logo, there is a separate PyGMT logo which can be plotted and added to a | ||
| figure using :meth:`pygmt.Figure.pygmtlogo`. The design of the logo itself is kindly | ||
| provided by `@sfrooti <https://github.com/sfrooti>`_ and consists of a visual and the | ||
| wordmark "PyGMT". | ||
|
|
||
| The visual is available in circle and hexagon shapes. It can be plotted using colors | ||
| of Python (blue Earth and yellow compass lines) and GMT (red letters GMT) or in black | ||
| and white as well as in light or dark mode. The wordmark can be added on the right | ||
| side or at the bottom of the visual. | ||
| """ | ||
|
|
||
| # %% | ||
| import pygmt | ||
|
|
||
| # %% | ||
| # Plot the PyGMT logo without any arguments: | ||
|
|
||
| fig = pygmt.Figure() | ||
| fig.pygmtlogo() | ||
| fig.show() | ||
|
|
||
|
|
||
| # %% | ||
| # Via the ``color``, ``theme``, ``shape`` parameters the appereance of the logo can be | ||
| # changed: | ||
|
|
||
| fig = pygmt.Figure() | ||
| fig.basemap(region=[-1, 1, -1, 1], projection="X4.5c/4.5c", frame="+g180/199/231") | ||
|
yvonnefroehlich marked this conversation as resolved.
Outdated
|
||
|
|
||
| fig.pygmtlogo(color=False, position="TL") | ||
|
|
||
| fig.pygmtlogo(theme="dark", position="TR") | ||
|
|
||
| fig.pygmtlogo(color=False, theme="dark", position="BL") | ||
|
|
||
| fig.pygmtlogo(shape="hexagon", position="BR") | ||
|
|
||
| fig.show() | ||
|
|
||
|
|
||
| # %% | ||
| # Via the ``wordamrk`` parameter the text "PyGMT" can be added on the right side | ||
| # or at the bottom of the visual: | ||
|
|
||
| fig = pygmt.Figure() | ||
| fig.basemap(region=[-1, 1, -1, 1], projection="X7c/5c", frame="+g180/199/231") | ||
|
|
||
| fig.pygmtlogo(wordmark="horizontal", position="TC", width="6c") | ||
|
|
||
| fig.pygmtlogo(theme="dark", wordmark="vertical", position="BC", height="3c") | ||
|
|
||
| fig.show() | ||
|
|
||
|
|
||
| # sphinx_gallery_thumbnail_number = 3 | ||
|
yvonnefroehlich marked this conversation as resolved.
Outdated
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Parehaps rewording it like:
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.
I made some changes to the formulations, but still not 100 % happy. Would like to include some background of the desgin idea.
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.
That's a good idea,but I feel it should be added directly to the docstring of the Figure.pygmtlogo method