-
Notifications
You must be signed in to change notification settings - Fork 235
Document the built-in patterns in the Technical Reference section #3466
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 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ac30a48
Document the predefined patterns
seisman 20475ec
Typo
seisman 5838026
Update examples/gallery/symbols/patterns.py [skip ci]
seisman 57e2484
Merge branch 'main' into doc/patterns
seisman e702074
Apply suggestions from code review
seisman 9a615d9
Merge branch 'main' into doc/patterns
seisman 04e507b
Update examples/gallery/symbols/patterns.py
seisman eb17897
Update examples/gallery/symbols/patterns.py
seisman 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
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
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,25 @@ | ||
| # Bit and hachure patterns | ||
|
|
||
| PyGMT supports a variety of bit and hachure patterns that can be used to fill polygons. | ||
|
|
||
| These patterns can be defined using the following syntax: | ||
|
|
||
| **P**|**p**_pattern_[**+b**_color_][**+f**_color_][**+r**_dpi_] | ||
|
|
||
| *pattern* can either be a number in the range 1-90 or the name of a 1-, 8-, or 24-bit | ||
| image raster file. The former will result in one of the 90 predefined 64x64 bit-patterns | ||
| provided by GMT (see the figure below). The latter allows the user to create customized, | ||
| repeating images using image raster files. | ||
|
|
||
| By specifying upper case **P** instead of **p** the image will be bit-reversed, i.e., | ||
| white and black areas will be interchanged (only applies to 1-bit images or predefined | ||
| bit-image patterns). For these patterns and other 1-bit images one may specify | ||
| alternative **b**ackground and **f**oreground colors (by appending **+b**_color_ and/or | ||
| **+f**_color_) that will replace the default white and black pixels, respectively. | ||
| Excluding *color* from a fore- or background specification yields a transparent image | ||
| where only the back- or foreground pixels will be painted. The **+r**_dpi_ modifier sets | ||
| the resolution in dpi. | ||
|
|
||
| The image below shows the 90 predefined bit patterns that can be used in PyGMT. | ||
|
|
||
|  |
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
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.
Uh oh!
There was an error while loading. Please reload this page.