-
Notifications
You must be signed in to change notification settings - Fork 229
Figure.text: Parsing of additional arguments when plotting text from file #479
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
Comments
👋 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. |
The text documentation says:
The font, angle and justify are not needed unless you add more modifiers to -F option. For example, if you don't use -F option, then your input data should be:
If you use -F+f+a+j, then your input file format is:
|
Ok - I understand now, though I do not think it is made adequately clear in the documentation that you must add this -F+f+a+j in order for it to work.
This phrasing suggests you can use fields in the text file OR set them with -F. I see why there would be issues replicating this with the current implementation of the PyGMT text binding. I'm happy for this issue to be closed and I'll gather my thoughts and open a new issue (as suggested by you here) on the implementation of text in PyGMT. Thanks for your response. |
Oops, this is only available on the |
Just to cross-reference #481 (comment) and confuse things further, it should be Unfortunately, the current PyGMT |
I think we don't have many choices. The only two options I can see:
I prefer to option 1 because with option 2, (1) the codes will be more complicated; (2) angle is still required to be the 3rd column, so it's impossible to be as flexible as the GMT CLI. |
Description of the problem
I am finding that adding text from a file isn't working as expected (based on the GMT documentation). The additional arguments are not parsed, instead the input files are treated as if there were only 3 input columns (x, y, text).
Full code that generated the error
You will need an additional file:
echo 117,5.2,Helvetica,0,CM,SABAH > example.txt
Full error message
This actually appeared to be a problem with GMT 6 as well. Maybe I'm just missing something? I am interpreting it from:
This is one or more files containing 1 or more records with (x, y[, font, angle, justify], text).
If so, apologies. I also tried delimiting with spaces instead of commas to no avail.System information
Please paste the output of
python -c "import pygmt; print(pygmt.__version__)"
:(Note: I had to change the above command, as pygmt.show_versions() didn't exist!)
The text was updated successfully, but these errors were encountered: