GenericMappingTools / GenericMappingTools/pygmt
Figure.barb: Plot wind barbs in 2-D and 3-D
- Lenguaje dominante
- Python
- Estrellas
- 874
- Forks
- 255
- Merge medio
- 1 d 21 h
- PR fusionados (30 d)
- 40
Descripción
*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](https://github.com/user-attachments/files/23842112/barbs_strength.txt), [barbs_direction.txt](https://github.com/user-attachments/files/23842102/barbs_direction.txt)
```python
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`
- [ ] ~~`-U`~~: Use `Figure.timestamp` instead.
- [ ] ~~`-X`/`-Y`~~: Use `Figure.shift_origin` instead.
- [ ] ~~`--PAR=value`~~: Use `pygmt.config` instead.
## 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.*
Guía de contribución
Línea de trabajo
Comienza por el punto de entrada Figure.barb y la documentación enlazada de GMT sobre barb, utilizando los archivos de entrada de ejemplo y la lista de comprobación de opciones para delimitar el alcance del wrapper. Se considera terminado cuando una implementación inicial de PyGMT admite los requisitos indicados para el trazado de wind-barbs 2-D y 3-D y las opciones documentadas, y el ejemplo del tutorial o de la galería queda registrado como trabajo pendiente de seguimiento.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- data-visualization
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100