From b52218ae50fa5c26f2f3fd3e530b8cbc84a94131 Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Wed, 24 Jun 2026 09:37:24 -0300 Subject: [PATCH 1/2] Fix-8999 --- src/gmt_plot.c | 2 +- src/gmt_support.c | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gmt_plot.c b/src/gmt_plot.c index 29aae382a06..3825e23ec5d 100644 --- a/src/gmt_plot.c +++ b/src/gmt_plot.c @@ -7213,7 +7213,7 @@ int gmt_draw_map_scale (struct GMT_CTRL *GMT, struct GMT_MAP_SCALE *ms) { x_left = ms->refpoint->x - 0.5 * bar_width; /* x-coordinate of leftmost scalebar point */ x_right = ms->refpoint->x + 0.5 * bar_width; /* x-coordinate of rightmost scalebar point */ - if (ms->fancy && gmt_M_is_geographic (GMT, GMT_IN)) { /* Fancy scale */ + if (ms->fancy) { /* Fancy (checkerboard) scale, now allowed for both geographic and Cartesian projections */ unsigned int i, justify, form; unsigned int n_f_ticks[10] = {5, 4, 6, 4, 5, 6, 7, 4, 3, 5}; unsigned int n_a_ticks[10] = {1, 2, 3, 2, 1, 3, 1, 2, 1, 1}; diff --git a/src/gmt_support.c b/src/gmt_support.c index 1f0ff615e11..b27d51e2a47 100644 --- a/src/gmt_support.c +++ b/src/gmt_support.c @@ -14202,14 +14202,8 @@ int gmt_getscale (struct GMT_CTRL *GMT, char option, char *text, struct GMT_MAP_ error++; } /* Optional modifiers +a, +f, +j, +l, +o, +u, +v */ - if (gmt_get_modifier (ms->refpoint->args, 'f', NULL)) { /* Do fancy label */ - if (gmt_M_is_cartesian (GMT, GMT_IN)) { /* Not allowed' */ - GMT_Report (GMT->parent, GMT_MSG_ERROR, "Option -%c: No fancy map scale modifier allowed for Cartesian projections\n", option); - error++; - } - else - ms->fancy = true; - } + if (gmt_get_modifier (ms->refpoint->args, 'f', NULL)) /* Do fancy (checkerboard) scale bar; now allowed for both geographic and Cartesian projections */ + ms->fancy = true; if (gmt_get_modifier (ms->refpoint->args, 'v', NULL)) { /* Ask for vertical Cartesian scale */ if (gmt_M_is_geographic (GMT, GMT_IN)) { /* Not allowed' */ GMT_Report (GMT->parent, GMT_MSG_ERROR, "Option -%c: No vertical scale modifier allowed for geographic projections\n", option); From a0f9e0a11c7a96db60b25ed0571f974862815b5a Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Wed, 24 Jun 2026 09:50:11 -0300 Subject: [PATCH 2/2] Update doc --- doc/rst/source/explain_-L_scale.rst_ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/rst/source/explain_-L_scale.rst_ b/doc/rst/source/explain_-L_scale.rst_ index ef86444145d..eb0258d35be 100644 --- a/doc/rst/source/explain_-L_scale.rst_ +++ b/doc/rst/source/explain_-L_scale.rst_ @@ -9,8 +9,8 @@ .. include:: explain_refpoint.rst_ The following modifiers can be appended to |-L| (**+w** is required), with additional explanation and - examples provided in the :ref:`placing-map-scales` cookbook section. For Cartesian projection, the modifiers - **+c** and **+f** are not allowed and no units should be appended in **+w**. + examples provided in the :ref:`placing-map-scales` cookbook section. For Cartesian projection, the modifier + **+c** is not allowed and no units should be appended in **+w**. - **+w**\ *length* to set scale *length* in km, or append :ref:`unit ` from **e**\|\ **f**\|\ **k**\|\ **M**\|\ **n**\|\ **u**.