Skip to content

Failed to specify the suffix for latitudes (i.e. N/S) in the polar coordinate system (-Jp, -JP) #5120

Closed

Description

@zhong-yy

Description of the problem
I wanted to plot data that are given in polar coordinates (latitude, radius), so I chose the linear projection -JP. But I encountered the following problems:

  1. The angle was treated as longitude by default rather than latitude, so the suffix was W or E.
  2. The options +llabel and +uunit didn't work under the projection with polar coordinates -JP.

Full script that generated the error

Here is a minimum working example:

gmt begin Jp jpg E300
    gmt set FORMAT_GEO_MAP ddd:mm:ssF
    gmt basemap -JP5c+z+t0 -R-30/30/4371/6371 -Bxa15f+u" N" -Bya+l"Depth (km)" -BWNse
gmt end show

I have tried -JP3c+z+t0+a, but it didn't work.

Actual outcome
Jp

Expected outcome

I want to change W (E) to S (N), like this:
image12

System information

  • Operating system: Ubuntu20.04
  • GMT version (gmt --version): 6.1.1

Activity

  1. added
    bug
    on Apr 9, 2021
  2. self-assigned this
    on Apr 9, 2021
  3. PaulWessel commented on Apr 9, 2021

    @PaulWessel
    Contributor

    Thanks for the post. I guess GMT cannot know what the angular measures are, so it will need to be told. It looks like it assumes these are always longitudes. I think we need to contemplate a situation where we can communicate to -JP the following

    1. The angles are longitude: Formatting will be as for longitude.
    2. The angles are latitude: Formatting will be as for latitude.
    3. The angles are just angles: Formatting will be for angles with degree symbol only.

    I am guessing we need to add a new modifier to -JP|p, e.g. +kkind, where kind may be x (longitude) or y (latitude). The default would just be degrees.

    Alternatively, we use -f0x and -f0y instead to indicate the same information.

    Other thoughts on this, @joa-quim, @meghanrjones and @seisman ?

  4. maxrjones commented on Apr 9, 2021

    @maxrjones
    Member

    Thanks for the post. I guess GMT cannot know what the angular measures are, so it will need to be told. It looks like it assumes these are always longitudes. I think we need to contemplate a situation where we can communicate to -JP the following

    1. The angles are longitude: Formatting will be as for longitude.
    
    2. The angles are latitude: Formatting will be as for latitude.
    
    3. The angles are just angles: Formatting will be for angles with degree symbol only.
    

    I am guessing we need to add a new modifier to -JP|p, e.g. +kkind, where kind may be x (longitude) or y (latitude). The default would just be degrees.

    Alternatively, we use -f0x and -f0y instead to indicate the same information.

    Other thoughts on this, @joa-quim, @meghanrjones and @seisman ?

    This solution seems good to me.

  5. seisman commented on Apr 9, 2021

    @seisman
    Member

    I am guessing we need to add a new modifier to -JP|p, e.g. +kkind, where kind may be x (longitude) or y (latitude). The default would just be degrees.

    This makes more sense to me.

  6. zhong-yy commented on Apr 11, 2021

    @zhong-yy
    Author

    Thanks for the post. I guess GMT cannot know what the angular measures are, so it will need to be told. It looks like it assumes these are always longitudes. I think we need to contemplate a situation where we can communicate to -JP the following

    1. The angles are longitude: Formatting will be as for longitude.
    
    2. The angles are latitude: Formatting will be as for latitude.
    
    3. The angles are just angles: Formatting will be for angles with degree symbol only.
    

    I am guessing we need to add a new modifier to -JP|p, e.g. +kkind, where kind may be x (longitude) or y (latitude). The default would just be degrees.

    Alternatively, we use -f0x and -f0y instead to indicate the same information.

    Other thoughts on this, @joa-quim, @meghanrjones and @seisman ?

    Thank you for your quick reply. I'm looking forward to the new modifier. By the way, do you know how to enable the axis label for JP? In this example, I used -Bya+l"Depth (km)" and but "Depth (km)" didn't show.

  7. PaulWessel commented on Apr 11, 2021

    @PaulWessel
    Contributor

    No such option at the moment. I am having a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions