GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — plot: Fix the bug that -M+r modifier doesn't set the pen thickness by seisman · Pull Request #9070 · GenericMappingTools/gmt

Conversation

@seisman

@seisman seisman commented Jun 24, 2026

Copy link
Copy Markdown
Member

The plot's -M documenation says (https://docs.generic-mapping-tools.org/6.6/plot.html#m):

+r - Specify a pen to simply draw a line instead of a filled box in the legend, but replace the color information with that from the fill settings (i.e., only the pen width is used as specified, the color is not used).

Based on the documentation, the +r modifier should control the pen thickness of legend entries, but it doesn't work as expected. In the following script, +r5p set the pen thickness to 5p, but 5p is silently ignored.

#!/usr/bin/env bash
# Demonstrate filling of area between two sinusoidal curves with a section of NaNs
gmt begin GMT_fill_curves
	gmt math -T0/720/5 -N3/0 T -C1 COSD -C2 3 MUL SIND 4 DIV -C1,2 1 T 200 250 INRANGE SUB 0 NAN MUL = both_NaN.txt
	gmt plot -Mc+gblue+r5p+l"Short @~l@~ exceeds long" -Bxa90g90+u@. -Byafg -BWStr -JX15c/3c -R0/720/-1.25/2.5 both_NaN.txt -Gred -l"Long @~l@~ exceeds short"
gmt end show

This PR fixes the bug.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@seisman
plot: Fix the bug that -M+r modifier doesn't set the pen thickness
46628d0
@seisman seisman added this to the 6.7.0 milestone Jun 24, 2026
@seisman seisman added the bug Something isn't working label Jun 24, 2026
@seisman seisman mentioned this pull request Jun 24, 2026
Figure.fill_between: Fill the areas between to horizontal curves GenericMappingTools/pygmt#4678
Closed
20 of 45 tasks
@Esteban82

Esteban82 commented Jun 24, 2026

Copy link
Copy Markdown
Member

It works for me.
GMT_fill_curves

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Esteban82
Esteban82 self-requested a review June 24, 2026 15:03
@Esteban82 Esteban82 added the add-changelog Add PR to the changelog label Jun 24, 2026
@seisman seisman mentioned this pull request Jun 24, 2026
Figure.fill_between: Add parameter 'legend_pen' to draw legend entries as lines GenericMappingTools/pygmt#4698
Merged
Esteban82
Esteban82 approved these changes Jun 24, 2026
View reviewed changes
@seisman
seisman merged commit 0644cf9 into master Jun 25, 2026
10 of 14 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@seisman
seisman deleted the plot/fill_between_+r branch June 25, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Esteban82 Esteban82 Esteban82 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

add-changelog Add PR to the changelog bug Something isn't working

Projects

None yet

Milestone

6.7.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@seisman @Esteban82
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.