Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/gmt_plot.c
Original file line number Diff line number Diff line change
Expand Up @@ -5228,7 +5228,7 @@ GMT_LOCAL unsigned int gmtplot_geo_vector_smallcircle (struct GMT_CTRL *GMT, dou
az[0] = gmtplot_smallcircle_az (GMT, C.A, S); /* Compute the azimuth from A to B at A along small circle */
scl[0] = (perspective) ? S->v.scale : gmtplot_get_local_scale (GMT, C.lon[0], C.lat[0], 0.001 * C.r, az[0]); /* Get local deg/inch scale at A in az[0] direction */
dr[0] = scl[0] * (head_length - 1.1*dshift[0]); /* This is arrow head length in degrees, approximately, adjusted for ~pen thickness to ensure no gap between head and line (the 1.1 slop) */
if (dr[0] > h_length_limit) { /* Head length still too long, refuse to plot it */
if (dr[0] > h_length_limit * (1.0 + GMT_CONV8_LIMIT)) { /* Head length still too long, refuse to plot it */
gmt_M_memcpy (Ax, C.A, 3, double); /* No need to shorten arc at beginning */
heads -= 1; /* Not purse this head any further */
warn = 1;
Expand All @@ -5252,7 +5252,7 @@ GMT_LOCAL unsigned int gmtplot_geo_vector_smallcircle (struct GMT_CTRL *GMT, dou
az[1] = -gmtplot_smallcircle_az (GMT, C.B, S); /* Compute the azimuth from B to A at B along small circle */
scl[1] = (perspective) ? S->v.scale : gmtplot_get_local_scale (GMT, C.lon[1], C.lat[1], 0.01 * C.r, az[1]); /* Get local deg/inch scale */
dr[1] = S->v.scale * (head_length - 1.1*dshift[1]); /* This is arrow head length in degrees, approximately, adjusted for ~pen thickness to ensure no gap between head and line */
if (dr[1] > h_length_limit) { /* Head length too long, refuse to plot it */
if (dr[1] > h_length_limit * (1.0 + GMT_CONV8_LIMIT)) { /* Head length too long, refuse to plot it */
gmt_M_memcpy (Bx, C.B, 3, double); /* No need to shorten arc at end */
heads -= 1; /* Not purse this head any further */
warn = 1;
Expand Down Expand Up @@ -5481,7 +5481,7 @@ GMT_LOCAL unsigned int gmtplot_geo_vector_greatcircle (struct GMT_CTRL *GMT, dou
az[0] = gmt_az_backaz (GMT, C.lon[0], C.lat[0], C.lon[1], C.lat[1], false); /* Compute the azimuth from A to B at A along great circle */
scl[0] = (perspective) ? S->v.scale : gmtplot_get_local_scale (GMT, C.lon[0], C.lat[0], 0.001 * C.r, az[0]); /* Get local deg/inch scale at A in az[0] direction */
dr[0] = scl[0] * (head_length - 1.1*dshift[0]); /* This is arrow head length in degrees, approximately, adjusted for ~pen thickness to ensure no gap between head and line */
if (dr[0] > h_length_limit) { /* Head length still too long, refuse to plot it */
if (dr[0] > h_length_limit * (1.0 + GMT_CONV8_LIMIT)) { /* Head length still too long, refuse to plot it */
gmt_M_memcpy (Ax, C.A, 3, double); /* No need to shorten arc at beginning */
heads -= 1; /* Not purse this head any further */
warn = 1;
Expand All @@ -5501,7 +5501,7 @@ GMT_LOCAL unsigned int gmtplot_geo_vector_greatcircle (struct GMT_CTRL *GMT, dou
az[1] = gmt_az_backaz (GMT, C.lon[1], C.lat[1], C.lon[0], C.lat[0], false); /* Compute the azimuth from B to A at B along great circle */
scl[1] = (perspective) ? S->v.scale : gmtplot_get_local_scale (GMT, C.lon[1], C.lat[1], 0.01 * C.r, az[1]); /* Get local deg/inch scale */
dr[1] = scl[1] * (head_length - 1.1*dshift[1]); /* This is arrow head length in degrees, approximately, adjusted for ~pen thickness to ensure no gap between head and line */
if (dr[1] > h_length_limit) { /* Head length still too long, refuse to plot it */
if (dr[1] > h_length_limit * (1.0 + GMT_CONV8_LIMIT)) { /* Head length still too long, refuse to plot it */
gmt_M_memcpy (Bx, C.B, 3, double); /* No need to shorten arc at end */
heads -= 2; /* Not purse this head any further */
warn = 1;
Expand Down
3 changes: 2 additions & 1 deletion test/baseline/grdvector.dvc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
outs:
- md5: 752b35fff020e0e8596263531ca31881.dir
- md5: b89da65807cedb581674f370bf283c99.dir
nfiles: 15
path: grdvector
hash: md5
size: 1447408
4 changes: 2 additions & 2 deletions test/baseline/psxy.dvc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
outs:
- md5: 6dbbc75aa2f8752b1450e4f22b7656f2.dir
- md5: 50c24ac06cd74cec4b0293df19189430.dir
nfiles: 147
path: psxy
hash: md5
size: 9555170
size: 9545509
2 changes: 0 additions & 2 deletions test/grdvector/met_uv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# testing vector head shrinking and non-plotting for plain and filled geovectors
# Using tiny subset of data shown in https://github.com/GenericMappingTools/gmt/issues/6108
# New behavior is skipping of heads when size exceeds length
# GMT_KNOWN_FAILURE_LINUX
# GMT_KNOWN_FAILURE_WINDOWS
gmt begin met_uv
gmt set MAP_FRAME_TYPE plain FONT_TAG 12p
gmt subplot begin 5x1 -Fs14c/4.21c -R84/96/24.75/28 -JM14c -Sct -Srl -M2p -A
Expand Down
Loading