grdvector not producing arrow head

Added by Pavlos 9 months ago

Hi all,

I cannot make grdvector to produce an arrow head.
I am reading my input from 2 files (wx_grd000.tmp, wy_grd000.tmp) and write to tmp000.ps
Here is the command:

"grdvector -O wx_grd000.tmp wy_grd000.tmp -R-180/180/-70/70 -JM12c -Q0.05c+ec+ea+jc -W0.1c,white -I5/5 >> tmp000.ps"

What is strange is that it partially works: it produces stick plots. But I cannot produce arrow heads, whichever combination of vector attributes I use with -Q.
Am I doing anything wrong?

Thanks!


Replies (5)

RE: grdvector not producing arrow head - Added by Paul 9 months ago

0.5 mm is an awfully small arrow head. Can you even see them? Does using 0.5c show heads? Also, you set both arrow and circle symbol at the end (+e); that is clearly wrong and may cause a problem. Finally, what gmt version, os etc. Pleas post data file so we can reproduce if it still does not work. We are at AGU so be patient.

RE: grdvector not producing arrow head - Added by Pavlos 9 months ago

Hi Paul,

Thanks for the quick response.
I made the changes you propose but unfortunately it still doesn't work.
Here is the whole script:

xyz2grd wx000.xy -Gwx_grd000.tmp -R-180/180/-70/70 -I1 -dinodata
xyz2grd wy000.xy -Gwy_grd000.tmp -R-180/180/-70/70 -I1 -dinodata
pscoast -R-180/180/-70/70 -JM12c -Dc -Sblue -Glightgray -W0.01p,black -B22.5 --FONT_ANNOT_PRIMARY=4p,Helvetica,black -K > tmp000.ps
grdvector -O wx_grd000.tmp wy_grd000.tmp -R-180/180/-70/70 -JM12c -Q0.5c+ea+jc -W0.1c,white -I5/5 >> tmp000.ps
psconvert tmp000.ps -A -P -Tg

I also attached the file data.
I am using gmt 5.2.1.

Thanks again!

wy000.xy (914 KB)

wx000.xy (909 KB)

RE: grdvector not producing arrow head - Added by Paul 9 months ago

There is a bug that affects certain projections and I am working on a fix. However, there are also issues with your script I think. There is no scale given, so implicitly -S1 is set. Then you are using 0.1c as the vector stem width. Given your map is only 12 c wide and 6.6 cm tall it is pretty thick (but the bug makes this worse). I will post more when I have a fix.

RE: grdvector not producing arrow head - Added by Paul 9 months ago

I have implemented a fix in r19511. The attached plot was made with this script:

gmt pscoast -R-180/180/-70/70 -JM18c -Dc -Sblue -Glightgray -W0.01p,black -Baf -P --FONT_ANNOT_PRIMARY=9p,Helvetica,black -K -Xc > t.ps
gmt grdvector -O wx_grd000.nc wy_grd000.nc -R-180/180/-70/70 -J -Q2.5p+e+jc+gwhite -Si25 -W0.5p,white -I5 >> t.ps

t.pdf (154 KB)

RE: grdvector not producing arrow head - Added by Pavlos 9 months ago

Thank you very much Paul!

(1-5/5)