Skip to content

-Bs is incorrectly interpreted? #5344

Closed

Description

@seisman

Description of the problem

The following command uses -Bnesw to plot 4 axes:

gmt basemap -R0/40/0/40 -JX4c/4c -Bnesw -Baf -png map

image

Use -Bn gives:

image

Use -Bs gives:

image

GMT may incorrectly interpret s as the secondary axis/annotation/label.

System information

  • Operating system: macOS
  • GMT version (gmt --version): 6.3.0_17131b2_2021.06.15

Activity

  1. added
    bug
    on Jun 17, 2021
  2. PaulWessel commented on Jun 17, 2021

    @PaulWessel
    Contributor

    Hm, I note it works as expected if you place -Bs as the last -B option. I think the order is important and I think I am actually sorting these options somewhere to ensure that but perhaps it is failing in this case. It is true the -Bs is problematic given its multiple meanings...

  3. PaulWessel commented on Jun 17, 2021

    @PaulWessel
    Contributor

    See gmt_parse.c function
    GMT_LOCAL void gmtparse_ensure_b_options_order (struct GMT_CTRL *GMT, struct GMT_OPTION *options);
    The fun thing about that function is that it sets up priorities for the various -B option as to how they should be sorted.
    Then it does nothing...

  4. PaulWessel commented on Jun 18, 2021

    @PaulWessel
    Contributor

    I am finally tackling the sorting of the options array - seems to work. Doing testing now. This means the user order will no longer matter as we do an internal shuffle.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions