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 — psmeca: let it recognize master CPTs in -C by joa-quim · Pull Request #8966 · GenericMappingTools/gmt

Conversation

@joa-quim

@joa-quim joa-quim commented Apr 8, 2026

Copy link
Copy Markdown
Member

Address the issue raised in https://forum.generic-mapping-tools.org/t/changing-beach-ball-color-with-focal-depth-using-meca/6392/8, where a -Cjet was raising an error related to a pen setting.

Sorry, something went wrong.

Uh oh!

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

All reactions
@joa-quim
psmeca: let it recognize master CPTs in -C
ad120c9
@joa-quim
joa-quim requested a review from a team April 8, 2026 00:27
@Esteban82
Esteban82 self-requested a review April 8, 2026 11:03
@Esteban82 Esteban82 added enhancement Improving an existing feature add-changelog Add PR to the changelog labels Apr 8, 2026
Esteban82
Esteban82 approved these changes Apr 8, 2026
View reviewed changes

@Esteban82 Esteban82 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested and it works fine.

Sorry, something went wrong.

Uh oh!

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

All reactions
Esteban82 added 2 commits April 8, 2026 08:44
@Esteban82
Add execute permission to gmt_functions.sh
5e172bd
@Esteban82
Add execute permission to var_offset.sh
e5d5e77
@joa-quim
joa-quim merged commit db194fe into master Apr 8, 2026
9 of 13 checks passed

Uh oh!

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

@joa-quim
joa-quim deleted the meca-master-cpt branch April 8, 2026 12:20
@Esteban82 Esteban82 mentioned this pull request Sep 3, 2026
meca: Only stretch master CPTs given in -C to the depth range #9177
Merged
Esteban82 added a commit that referenced this pull request Sep 4, 2026
@Esteban82 @claude
meca: Only stretch master CPTs given in -C to the depth range (#9177)
e3fa9e2
Fixes #9176.

Since #8966 meca always resampled the CPT given in -C so that it spanned
the depth range of the events being plotted.  That silently discarded the
z-range of a CPT the user had prepared with makecpt, so the beachball
colors no longer agreed with the CPT (nor with the colorbar drawn from
it), and they even changed when events were added to or removed from the
input file.

The stretching is only needed for the case #8966 added, i.e., when -C is
given the name of a master CPT (e.g., -Cbatlow), since those only have
the default 0-1 range.  So we now record at parse time whether the -C
argument is a master CPT name and only stretch in that case; a real CPT
file, and the current CPT in modern mode, are used as given.

We also use gmt_stretch_cpt instead of gmt_sample_cpt, which preserves
any hinge and does not leave the original CPT behind, we widen the
stretched range by the same round-off guard gmt_get_palette uses so the
deepest event cannot fall outside the CPT and pick up the foreground
color, and we plug the leak of the string returned by gmt_is_cpt_master.

Co-authored-by: Claude Opus 5 <[email protected]>
@seisman seisman mentioned this pull request Sep 12, 2026
Release GMT 6.7.1 #9202
Closed
1 of 50 tasks
seisman pushed a commit that referenced this pull request Sep 15, 2026
@Esteban82 @claude @seisman
meca: Only stretch master CPTs given in -C to the depth range (#9177)
865fb9e
Fixes #9176.

Since #8966 meca always resampled the CPT given in -C so that it spanned
the depth range of the events being plotted.  That silently discarded the
z-range of a CPT the user had prepared with makecpt, so the beachball
colors no longer agreed with the CPT (nor with the colorbar drawn from
it), and they even changed when events were added to or removed from the
input file.

The stretching is only needed for the case #8966 added, i.e., when -C is
given the name of a master CPT (e.g., -Cbatlow), since those only have
the default 0-1 range.  So we now record at parse time whether the -C
argument is a master CPT name and only stretch in that case; a real CPT
file, and the current CPT in modern mode, are used as given.

We also use gmt_stretch_cpt instead of gmt_sample_cpt, which preserves
any hinge and does not leave the original CPT behind, we widen the
stretched range by the same round-off guard gmt_get_palette uses so the
deepest event cannot fall outside the CPT and pick up the foreground
color, and we plug the leak of the string returned by gmt_is_cpt_master.

Co-authored-by: Claude Opus 5 <[email protected]>
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 enhancement Improving an existing feature

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

2 participants

@joa-quim @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.