GenericMappingTools / GenericMappingTools/pygmt

Handling plotting functions that have an inquire (I) only mode

Aperta
#896 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
Python
Stelle
874
Fork
255
Merge medio
1g 21h
PR unite (30g)
40

Descrizione

**Description of the issue**

There are a few GMT modules that have a mode for extracting data (statistics or otherwise) via the inquire (I) flag in addition to plotting:

- [`rose`](https://docs.generic-mapping-tools.org/6.1/rose.html#i) - #794
- [`solar`](https://docs.generic-mapping-tools.org/6.1/solar.html#i) - #804, also has an `-M` mode where no plotting occurs
- [`histogram`](https://docs.generic-mapping-tools.org/6.1/histogram.html#i) - #563

How do we want to handle these cases? It seems weird to use `fig.histogram(..., inquire=...)` if no figure/plot is actually returned. One suggestion made at https://github.com/GenericMappingTools/pygmt/pull/794#pullrequestreview-584985363 was:

> Ideally, what we might have to do is make two user-facing `rose` functions:
>
> 1. A plotting-only `fig.rose`
>
> 2. A non-plotting `pygmt.rose` which will solely use the inquire (I) flag.
>
> Both of these could share a core `def _rose()` function and live within `pygmt/src/rose.py`. This is just an idea though, and probably quite hard to implement in one Pull Request. For now, we could implement just the plotting side (1) and raise a `NotImplementedError` for inquire (I), and perhaps wrap `pygmt.rose` (2) in a future PR? Or maybe there's a smarter alternative way.

Open to suggestions on how we want the API for this look like.

**Are you willing to help implement and maintain this feature?** Discuss first

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia esaminando le interfacce esistenti di rose, solar e histogram, insieme alle issue #794, #804 e #563 e alla discussione sulla pull request #794. L’implementazione condivisa proposta risiederebbe in pygmt/src/rose.py, ma il design dell’API non è ancora stato definito. Il lavoro sarà considerato completato quando sarà stato raggiunto un accordo su come esporre le modalità plotting e inquire-only e tale decisione sarà documentata o implementata in modo coerente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
data-visualization
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.