Figure.barb: Plot wind barbs in 2-D and 3-D
Maintainers usually reply within 1 day
@jjohnnystwsss is already working on this.
Since Nov 21, 2026.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- data-visualization
Research direction
Start with the Figure.barb entry point and the linked GMT barb documentation, using the example input files and option checklist to map the wrapper scope. Done means an initial PyGMT implementation supports the stated 2-D and 3-D wind-barb plotting requirements and the documented options, with the tutorial or gallery example addressed as tracked work.
Written by the indexing model from the issue text.
Description
This issue serves as the central place for discussing and tracking the implementation of the Figure.barb() method in PyGMT. The issue will be closed when the initial implementation is complete. Progress is tracked at https://github.com/orgs/GenericMappingTools/projects/3.
Example
input data: barbs_strength.txt, barbs_direction.txt
import pygmt
pen_barb = "0.5p,darkorange"
fill_barb = "brown"
fig = pygmt.Figure()
fig.basemap(region=[-5, 5] * 2, projection="X10c", frame=0)
for barbs_data, use_word in zip(
["barbs_strength.txt", "barbs_direction.txt"], [1, 0]
):
with pygmt.clib.Session() as session:
session.call_module(
'barb',
'{} \
-W{} \
-G{} \
-Q{}' \
.format(barbs_data, pen_barb, fill_barb, '0.5c')
)
fig.text(barbs_data, offset="0c/-0.05c", justify="TC", font="5p", use_word=use_word)
fig.show()
Documentation
- GMT: https://docs.generic-mapping-tools.org/dev/supplements/windbarbs/barb.html
- GMT.jl: https://www.generic-mapping-tools.org/GMTjl_doc/documentation/modules/.html
- PyGMT: https://www.pygmt.org/dev/api/generated/.html
GMT Option Flags and Modifieres
☑️: Implemented; ⬜: To be implemented/discussed; Strikethrough: Won't implement.
-
-R:region#XXX -
-J:projection#XXX -
-B:frame -
-G:fill -
-W:pen -
-Q: -
-C:cmap -
-D: -
-I: -
-N:no_clip -
: Use-UFigure.timestampinstead. -
: Use-X/-YFigure.shift_origininstead. -
: Use--PAR=valuepygmt.configinstead.
Notes on Input Formats
Add any notes on the input formats, especially the meaning of columns.
Linked Pull Requests
- Initial feature implementation #XXX
- Add a tutorial or gallery example
Related Issues and Discussions
Add links to related wrapper discussions, API design threads, or upstream GMT changes here.
- Dominant language
- Python
- Stars
- 882
- Forks
- 261
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 29
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GenericMappingTools/pygmt
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
GenericMappingTools/pygmt#5014 · 1 comment ·
Maintainers usually reply within 1 day
-
discussions documentation
Difficulty 1/5 Under an hour Newbie friendliness 78/100
GenericMappingTools/pygmt#4992 ·
Maintainers usually reply within 1 day
-
Improve reporting the GMT version via "pygmt.show_versions()"Possibly taken @yvonnefroehlich claimed this 114 days ago. Openmaintenance
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
GenericMappingTools/pygmt#4812 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
GenericMappingTools/pygmt#4765 ·
Maintainers usually reply within 1 day
-
Add an AGENTS.md filePossibly taken A pull request linked to this issue is open or already merged. Opendiscussions
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
GenericMappingTools/pygmt#4677 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
All issues in GenericMappingTools/pygmt
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TigreGotico/orthography2ipa#2950 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Unstructured-IO/unstructured#4876 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openfoodfacts/openfoodfacts-python#579 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
fairagro/m4.2_sql_to_arc#388 ·
Maintainers usually reply within 1 day