Skip to content

Fix colorbar NaN label color leaking from MAP_FRAME_PEN#9031

Open
Chuan1937 wants to merge 1 commit into
masterfrom
fix-9026-colorbar-nan-text-color
Open

Fix colorbar NaN label color leaking from MAP_FRAME_PEN#9031
Chuan1937 wants to merge 1 commit into
masterfrom
fix-9026-colorbar-nan-text-color

Conversation

@Chuan1937
Copy link
Copy Markdown
Member

@Chuan1937 Chuan1937 commented May 24, 2026

In src/psscale.c, prefix gmt_setfont and suffix gmt_setpen around the 4 NaN text gmt_map_textcalls:

if (Ctrl->D.etext) {
    form = gmt_setfont (GMT, &GMT->current.setting.font_annot[GMT_PRIMARY]);
    gmt_map_text (GMT, ..., form);
    gmt_setpen (GMT, &GMT->current.setting.map_frame_pen);
}

Right is fixed:
image

Fixes #9026

@Esteban82 Esteban82 self-requested a review May 24, 2026 14:30
@Esteban82 Esteban82 added the add-changelog Add PR to the changelog label May 24, 2026
@Esteban82
Copy link
Copy Markdown
Member

I can confirm that it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MAP_FRAME_PEN affects the font color of the text added to the NaN box of a colorbar

2 participants