Skip to content

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

@weiji14

Description

@weiji14

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:

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 #794 (review) 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions