Bug #1196
Problem with custom annotations
Status: | Closed | Start date: | 2018-02-01 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | - | |||
Target version: | Candidate for next bugfix release | |||
Affected version: | 6.x-svn | Platform: |
Description
Code:
echo "0 a A 0.5 a B 1 a C" > int echo "0.5 0.5"| gmt psxy -Sx1c -JX10c -R0/1/0/1 -BswNE -Bxycint -P > out.ps
Two problems:
1) There is now custom annotations, just numbers
2) Incorrect position of the cross
r19697
History
#1
Updated by Paul about 3 years ago
- Status changed from New to Resolved
- Assignee set to Paul
- Target version set to Candidate for next bugfix release
- % Done changed from 0 to 100
Conflict with internal parameters for the data i/o vs the label i/o. Fixed in r19705.
#2
Updated by Michael about 3 years ago
Fixed only the second item, on the axes still numbers instead of letters.
#3
Updated by Paul about 3 years ago
- File out.pdf added
echo "0.5 0.5"| gmt psxy -Sx1c -JX10c -R0/1/0/1 -BswNE -Bxycint -P > out.ps gmt psconvert out.ps -Tf -P -A
Not what I get. See out.pdf attached.
#4
Updated by Michael about 3 years ago
It seems strange. I attach my ps file and debug output from psxy.
r19714
#5
Updated by Joaquim about 3 years ago
It works for me too.
#6
Updated by Michael about 3 years ago
File gmt_support.c, function gmt_load_custom_annot, line 13158 in r19735.
nc = sscanf (S->text[row], "%s %[^\0]", type, txt);
I replace \0 on \n and it all worked .
I'm really wondering which implementation of sscanf allows a null byte in the middle of a format string?
#7
Updated by Paul about 3 years ago
Perhaps I was confused about how to specify "until end of line" in this case since there are no new-line characters in that string. So I used \0 and that works on at least OS X and Windows. However, happy to hear this works for you, it also works for me and I have made the change in r19736.