Skip to content

Odd issue with the -Xc option in modern mode #9278

Closed

Description

@ESaltPi

To start, I'm not entirely sure why -Xc was removed for modern mode (-Xf too, although i'm not using it).

I encountered a weird issue with using the gmt begin -C flag, that seems to trick GMT into not using modern mode.

gmt begin test1 ps
gmt basemap -R0/1/0/1 -JX4i -Baf -Xc
gmt end
gmt begin test2 ps -C
gmt basemap -R0/1/0/1 -JX4i -Baf -Xc
gmt end

Only the test2.ps plots because the -C seems to not initialize modern mode? I'm not sure whats happening here, but I can get around the issue by setting anything that would be in gmt.conf within each script.

For reference, here was what was in my gmt.conf:

#
# GMT 6.7.0 Defaults file
#
# COLOR Parameters
#
COLOR_BACKGROUND               = black
COLOR_FOREGROUND               = white
COLOR_NAN                      = white
#
# FONT Parameters
#
FONT_ANNOT_PRIMARY             = 8p,Helvetica,black
FONT_ANNOT_SECONDARY           = 8p,Helvetica,black
FONT_LABEL                     = 12p,Helvetica,black
FONT_TITLE                     = 10p,Helvetica,black
#
# FORMAT Parameters
#
FORMAT_GEO_MAP                 = ddd.xx
#
# GMT Miscellaneous Parameters
#
GMT_CUSTOM_LIBS                = /usr/local/lib/mbsystem.so
#
# MAP Parameters
#
MAP_ANNOT_OFFSET_PRIMARY       = 5p
MAP_FRAME_WIDTH                = 3p
#
# Projection Parameters
#
PROJ_LENGTH_UNIT               = inch
#
# PostScript Parameters
#
PS_MEDIA                       = letter
PS_PAGE_ORIENTATION            = landscape

GMT version: 6.7.0
Linux Ubuntu 22.04

Activity

  1. joa-quim commented on Oct 22, 2026

    @joa-quim
    Member

    Those commands work for me. Better to discuss this on the Forum in case of doubts than to open issues.

  2. ESaltPi commented on Oct 23, 2026

    @ESaltPi
    Author
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions