Bug #626

psxy -Sm plots inside-out arrowheads for end angles close to 180 degrees

Added by Eelco over 2 years ago. Updated over 2 years ago.

Status:ClosedStart date:2014-09-28
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Affected version:5.1.1 Platform:

Description

Using the math angle option of psxy with an arrowhead for angles close to 180 degrees results in one of the sides of the arrowhead to be plotted as a large (near?-)circular curve going around the origin of the angle vector, instead of the very short curve needed to close the arrowhead.

Here is example code:
echo 0 0 1 0 175 | gmt psxy -R-4/4/-4/4 -JX5c/5c -Sm0.2c+e+p++g-+r -W1.5p,red -Gblue -Bxa1 -Bya1 > test.ps

test_math_angle.png (22.8 KB) Eelco, 2014-09-28 23:44

Associated revisions

Revision 13575
Added by Paul over 2 years ago

Address issue #626

History

#1 Updated by Paul over 2 years ago

  • Status changed from New to In Progress
  • Assignee set to Paul
  • Target version set to Candidate for next bugfix release

Thanks, I can reproduce this and will work on a fix.

#2 Updated by Paul over 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Should be fixed in r13576. I have added a new test (test/psxy/matharrow.sh) that ensures the arcs for the arrow heads are arranged in the correct order.

#3 Updated by Eelco over 2 years ago

Thanks for the quick fix! I am using this to create an animation for which the angular vector goes from 0 to 360 over time. I have reinstalled GMT from svn today, and the result, with the curved arrowhead, now looks perfect. A very nice feature.

#4 Updated by Paul over 2 years ago

  • Status changed from Resolved to Closed

Thanks, closing this issue.

Also available in: Atom PDF