Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "-G" flag passthrough to psconvert for finding the correct gs version #2038

Closed
ericlindsey opened this issue Aug 3, 2022 · 2 comments · Fixed by #2078
Closed

Add "-G" flag passthrough to psconvert for finding the correct gs version #2038

ericlindsey opened this issue Aug 3, 2022 · 2 comments · Fixed by #2078
Labels
feature request New feature wanted
Milestone

Comments

@ericlindsey
Copy link

As discussed here, if an old version of gs installed on Windows is referred to in the registry, psconvert will use the old gs instead of any newer versions that might be referred to in the path (psconvert checks the registry only and not the path).

This leads to an error in pygmt.show() if the gs in the registry is too old; currently there is no way to point pygmt.show() to a newer version except by adding the path to the newer version into the registry.

However, pygmt.show_versions() is able to find a newer version of gs referred to in the path, for example if both have been installed through conda. A suggested workaround is to enable pygmt.show() and pygmt.savefig() to use the same method to determine that path to gs, and pass it on to psconvert via the -G flag.

@ericlindsey ericlindsey added the feature request New feature wanted label Aug 3, 2022
@welcome
Copy link

welcome bot commented Aug 3, 2022

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.

@seisman
Copy link
Member

seisman commented Aug 29, 2022

@ericlindsey After PR #2076 and #2078, now it's possible to specify the ghostscript path in Figure.show() or Figure.savefig() by giving an argument like gs_path="/path/to/gs".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants