Skip to content

6.0.0rc4 breaks pygmt #1636

Closed
Closed

Description

@seisman

Below is a simple PyGMT script, which used to work with 6.0.0rc1.

import pygmt
fig = pygmt.Figure()
fig.basemap(region="0/10/0/10", frame=True, projection="X10c")
fig.savefig("map.pdf")

The PyGMT script is equivalent to the following bash script:

gmt begin pygmt-session
gmt figure unique_name -
gmt basemap -R0/10/0/10 -Baf -JX10c
gmt psconvert -A -Fmap -Qg2 -Qt2 -Tf
gmt end

Running the bash script above gives following error message:

psconvert [ERROR]: Syntax error: Modern GMT mode requires the -F option
end [ERROR]: Failed to call psconvert
end [ERROR]: process_figures returned error 71

According to the comments in PyGMT codes, passing format - to the figure module means "don't produce files for this figure when running gmt end". It seems it doesn't work correctly in 6.0.0rc4.

Activity

  1. weiji14 commented on Sep 24, 2019

    @weiji14
    Member

    The '-' format doesn't seem to be properly documented in the figure docs either?

  2. PaulWessel commented on Sep 24, 2019

    @PaulWessel
    Contributor

    Are you sure that is how Leo used it? The C code checks to see if the figure name equals -, not the format. And since that fails it tries something... I can add a check so that if either name or format equals - then skip it.

  3. seisman commented on Sep 24, 2019

    @seisman
    MemberAuthor

    Closed as fixed by #1638.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions