The line is drawn inside the arrow of the vector
|Target version:||Candidate for next bugfix release|
If the arrow of the vector is longer than the vector, an ugly line is drawn inside the arrow.
echo "0.3 0.5 0 2 0.5 0.5 0 1 0.7 0.5 0 0.5"|\ gmt psxy -JX10c -R0/1/0/1 -SV1c+e+h0 -W0.5p,black -Gblack@80 -Xa1c -Ya1c -P >test.eps
I found the appropriate place in the source code, the required changes are fairly simple. Patch attached. It works with +b and +b+e too.
Maybe this is done intentionally, then I would like to have an option that disables this behavior.
- Status changed from New to In Progress
- Assignee set to Paul
Thanks for pointing this out. However, it turns out this has to do with some confusion in GMT about inches vs cm. When I run it with --PROJ_LENGTH_UNIT=inch it works fine (input lengths from stdin are considered to be in inches and no lines cut inside the head. With --PROJ_LENGTH_UNIT=cm I can recreate your case. Will come up with a fix.
- Status changed from In Progress to Resolved
- Target version set to Candidate for next bugfix release
- % Done changed from 0 to 100
Fixed in r19810. I used your suggested patch. I also added a warning from psxy when this situation occurs that suggests using the +n<norm> modifier. Added test script that now passes.
Thank you! I noticed this problem for a long time, but mistook for rendering errors and just used the filling of the vector arrow with an opaque color. Now I can draw beautiful translucent arrows.
For short arrows, the +n is not always applicable, the arrows can be so small that they become invisible. The absence of a +n allows at least to show information about the direction of the vector.