You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow passing arguments containing spaces into pygmt functions (#1487)
* Replace spaces in arguments with octal code 040
Modifying build_arg_string function to replace blank space
characters with octal code 040, and added a doctest to
check various combinations with single and double quotes
included.
* Remove workarounds for spaces in fig.subplot's autolabel and title args
Supersedes workaround for subplot's autolabel (-A)
and title (-T) parameters in
a9d167d,
4126c16, and
eadb847.
* Remove workaround for spaces in fig.text's -F argument
* Remove double quotes around legend label test examples
* Edit test_rose_no_sectors to remove single quotes from title
* Remove workaround for spaces in fig.psconvert prefix
Doesn't work yet, as the filename will contain the 040 octal
code, but committing to have the diff available for review.
* Ensure spaces in pygmt.config arguments can work
Also added a regression test for
FORMAT_DATE_MAP="o dd".
* Manually handle prefix -F in psconvert
So that fig.savefig won't insert `\040` characters when saving filenames
with spaces. Resolves problem mentioned in
https://github.com/GenericMappingTools/pygmt/pull/1487/files#r703116544
* Handle PROJ4 strings with spaces
Instead of converting spaces to \040 in proj4 strings, just remove them directly.
Added parametrized unit tests to basemap and grdproject to check that it works.
* Use Modifier Letter Colon instead of regular colon to fix WIndows tests
Adapted from https://stackoverflow.com/questions/10386344/how-to-get-a-file-in-windows-with-a-colon-in-the-filename/25477235#25477235.
* Try using underscore instead of Modifier Letter Colon
* Raise GMTInvalidInput if no prefix argument is passed to psconvert
Co-authored-by: Dongdong Tian <[email protected]>
0 commit comments