Skip to content

Let pshistogram handle both Cartesian and polar histograms #6141

Open

Description

@PaulWessel

Description of the desired feature

The psrose module is very old (2.4.1) and has a checkered history:

  1. It started off life not using -J but had a -Sradius option.
  2. The -R option is backwards [-Rr0/r1/theta0/theta1] relative to other azimuthal plots.
  3. Because not implemented as a projection we cannot use the -B machinery so any annotation problem requires fixes to the module itself.
  4. In GMT 5 we added -JXdiameter (as if this is a square Cartesian projection) because it would give the appearance of using -J.
  5. Elsewhere in GMT, we use have the polar cylindrical projection -JP with proper -B support, and here -R is properly given as -Rtheta0/theta1/r0/r1.

It is too late to fix the way psrose works. I propose this solution to address all the wrong things in psrose as well as enable future features:

  1. Add the polar histogram to pshistogram via -JP. Then -JX sets the Cartesian histogram and -JP does the polar. Both projections have proper -R and -B support.
  2. Deprecate psrose so it is no longer discussed but it will remain available under the hood for backwards usage.

Accepting comments from @GenericMappingTools/core.

Activity

  1. added
    feature request
    on Dec 22, 2021
  2. added this to the milestone on Dec 22, 2021
  3. self-assigned this
    on Dec 22, 2021
  4. Esteban82 commented on Dec 22, 2021

    @Esteban82
    Member

    Sound good!! I agree that psrose could be upgrade.

  5. maxrjones commented on Dec 22, 2021

    @maxrjones
    Member

    A few questions:

    1. Would all capabilities currently supported by psrose be possible with pshistogram -JP? (e.g., -E, -Q, -S)
    2. In the proposed merge of histogram and rose, would histograms representing multiple dimensions be a reasonable feature request (e.g., https://forum.generic-mapping-tools.org/t/plotting-a-wind-rose-2d-histogram-style/2415)? I agree with the author of that post in this being a major limitation of psrose.

    Linking @GenericMappingTools/pygmt-maintainers into the conversation, since this would likely lead to a PyGMT deprecation as well.

  6. PaulWessel commented on Dec 22, 2021

    @PaulWessel
    ContributorAuthor

    It is true that rose has a few options specific to polar histogram and of course those letters are already taken for other things in histogram. I will go through all options and see what collisions we end up.

  7. joa-quim commented on Dec 23, 2021

    @joa-quim
    Member

    I don't think deprecating psrose, even if leaving it crawling in the underground, is a good idea. People would start (and keep) asking what happened to it. Better just leave it as is and adding a big deprecation in the man page (but not necessarily in the binary).

  8. PaulWessel commented on Dec 23, 2021

    @PaulWessel
    ContributorAuthor

    To be discussed I think. We could even have a redirecting psrose page that explains why and gives the link to pshistogram. for instance.

  9. PaulWessel commented on Dec 23, 2021

    @PaulWessel
    ContributorAuthor

    The binning radially is also a desirable feature for Cartesian histograms, we will do that for both types.

  10. modified the milestones: , Future release on May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions