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

Let Figure.savefig support filenames with spaces #1116

Merged
merged 9 commits into from
Jun 14, 2021
Prev Previous commit
Next Next commit
Update pygmt/figure.py
Co-authored-by: Wei Ji <[email protected]>
  • Loading branch information
seisman and weiji14 committed Mar 25, 2021
commit abaee2e9e5bb756566f83b310c6ed4e94538fef7
3 changes: 1 addition & 2 deletions pygmt/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ def psconvert(self, **kwargs):
if "A" not in kwargs:
kwargs["A"] = ""
# allow for spaces in figure name
if kwargs.get("F"):
kwargs["F"] = f'"{kwargs.get("F")}"'
kwargs["F"] = f'"{kwargs.get("F")}"' if kwargs.get("F") else None
with Session() as lib:
lib.call_module("psconvert", build_arg_string(kwargs))

Expand Down