diff --git a/src/gmt_plot.c b/src/gmt_plot.c index 74fe578faf0..7f71d825e6c 100644 --- a/src/gmt_plot.c +++ b/src/gmt_plot.c @@ -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; @@ -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; @@ -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; @@ -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; diff --git a/test/baseline/grdvector.dvc b/test/baseline/grdvector.dvc index a2aba9f663a..e0c58b87f72 100644 --- a/test/baseline/grdvector.dvc +++ b/test/baseline/grdvector.dvc @@ -1,5 +1,6 @@ outs: -- md5: 752b35fff020e0e8596263531ca31881.dir +- md5: b89da65807cedb581674f370bf283c99.dir nfiles: 15 path: grdvector hash: md5 + size: 1447408 diff --git a/test/baseline/psxy.dvc b/test/baseline/psxy.dvc index b1c26a3594e..f06d69dd755 100644 --- a/test/baseline/psxy.dvc +++ b/test/baseline/psxy.dvc @@ -1,6 +1,6 @@ outs: -- md5: 6dbbc75aa2f8752b1450e4f22b7656f2.dir +- md5: 50c24ac06cd74cec4b0293df19189430.dir nfiles: 147 path: psxy hash: md5 - size: 9555170 + size: 9545509 diff --git a/test/grdvector/met_uv.sh b/test/grdvector/met_uv.sh index 216daaf9aa4..ef69c8914ec 100755 --- a/test/grdvector/met_uv.sh +++ b/test/grdvector/met_uv.sh @@ -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