I am having a simple problem with greenspline, if anyone would clarify it I would be grateful.
This is the example given in cookbook :
gmt begin 1D
gmt math -T0/10/1 0 1 NRAND = 1D.txt
gmt plot -R0/10/-5/5 -JX6i/3i -B -Sc0.1 -Gblack 1D.txt
gmt greenspline 1D.txt -R0/10 -I0.1 -Sc | gmt plot -Wthin
gmt end show
works just fine, BUT… if I use -N option and give a file instead it shows errors. Why it is?
Same code with -N option:
gmt begin 1D1
gmt math -T0/10/1 0 1 NRAND = 1D.txt
gmt plot -R0/10/-5/5 -JX6i/3i -B -Sc0.1 -Gblack 1D.txt
gmt greenspline 1D.txt -N1D_Nfile.txt -Sc | gmt plot -Wthin
gmt end show
where 1D_Nfile.txt contains one column, which is arbitrary values within the -T interval eg.
1.3
1.8
3.4
4.5
6.7
9.8
in 1D_Nfile.txt
The error which shows up is shown below:
greenspline [ERROR]: Mismatch between actual (1) and expected (2) fields near line 1 in file 1D.txt
greenspline [ERROR]: Mismatch between actual (1) and expected (2) fields near line 2 in file 1D_Nfile.txt
greenspline [ERROR]: Input file 1D_Nfile.txt has 0 column(s) but at least 1 are needed
And program ends.
What is wrong in what I am doing?? Please anyone who knows about it please reply…