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 — Add default reference point for map inset (-D) by Esteban82 · Pull Request #9077 · GenericMappingTools/gmt

Conversation

@Esteban82

@Esteban82 Esteban82 commented Jun 29, 2026

Copy link
Copy Markdown
Member

Assisted-by: Claude Sonnet 4.6

This PR makes the argument optional for the map inset option (-D).

When omitted, GMT now defaults to jTL (top-left corner inside the map frame) instead of raising a parsing error.

Test with:

gmt begin ex44 png
	gmt coast -R110E/170E/44S/9S -JM15c -Gbrown -Baf
    gmt inset begin -D+w4c -F+gwhite+p1p+c0.1c+s -Vi
		gmt coast -Rg -JG120/30S/? -Gbrown -Bg
	gmt inset end
gmt end
ex44

Please let me know if you’d prefer a different default setting. In PyGMT the Bottom Left corner is used.

Sorry, something went wrong.

Uh oh!

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

seisman reacted with eyes emoji
All reactions
  • 👀 1 reaction
@Esteban82
Update docs
0a38284
@Esteban82
Esteban82 requested review from a team, joa-quim and seisman June 29, 2026 22:14
@Esteban82 Esteban82 self-assigned this Jun 29, 2026
@Esteban82 Esteban82 added enhancement Improving an existing feature add-changelog Add PR to the changelog AI-assisted All (or most) of the code was written by Artificial Intelligence. labels Jun 29, 2026
@joa-quim

joa-quim commented Jun 29, 2026

Copy link
Copy Markdown
Member

Maybe it's only my taste, but I would put it at TR (that's what you did in the other PR) or BR

All reactions

Sorry, something went wrong.

Uh oh!

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

@Esteban82

Esteban82 commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

Yes, I would put it there too, but it would be the same corner used by the directional arrow (in #9074). That's why I chose "top left" so that the default positions wouldn't overlap.

All reactions

Sorry, something went wrong.

Uh oh!

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

@joa-quim

joa-quim commented Jun 30, 2026

Copy link
Copy Markdown
Member

Well, in that (very very rare) case the user has to decide where he/she wants to pout each of them.

All reactions

Sorry, something went wrong.

Uh oh!

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

@Esteban82

Esteban82 commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

I don't think it's that rare to have both an inset and a north arrow on the same map.

But if you insist with TR, I can change it.

All reactions

Sorry, something went wrong.

Uh oh!

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

@Esteban82
Change TL to TR
438b57e
@Esteban82

Esteban82 commented Jun 30, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

Changed to TR.

All reactions

Sorry, something went wrong.

Uh oh!

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

joa-quim
joa-quim approved these changes Jun 30, 2026
View reviewed changes
@Esteban82
Esteban82 merged commit cd2ce36 into master Jun 30, 2026
8 of 12 checks passed

Uh oh!

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

@Esteban82
Esteban82 deleted the set-default-inset-position branch June 30, 2026 15:29
@yvonnefroehlich

yvonnefroehlich commented Jul 2, 2026

Copy link
Copy Markdown
Member

For PyGMT we have currently the Bottom Left corner of the plot as default

All reactions

Sorry, something went wrong.

Uh oh!

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

@yvonnefroehlich yvonnefroehlich mentioned this pull request Jul 2, 2026
Figure.directional_rose/Figure.magnetic_rose: Set the default position to the top right GenericMappingTools/pygmt#4702
Merged
@Esteban82

Esteban82 commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

I have no problem to change it. @joa-quim ?

All reactions

Sorry, something went wrong.

Uh oh!

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

@joa-quim

joa-quim commented Jul 2, 2026

Copy link
Copy Markdown
Member

GMT.jl has insets too, but more elaborated as they can search best locations, but for full filled base image the default is TR. And the example in the GMT inset page, also set TR as the location. I don't think BL is a common default location for an inset.

All reactions

Sorry, something went wrong.

Uh oh!

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

@yvonnefroehlich yvonnefroehlich mentioned this pull request Jul 3, 2026
Release PyGMT v0.19.0 GenericMappingTools/pygmt#4649
Closed
40 of 43 tasks
@Esteban82 Esteban82 mentioned this pull request Sep 1, 2026
Set a default position for colorbar, map scale and directional rose #6222
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@joa-quim joa-quim joa-quim approved these changes
@seisman seisman Awaiting requested review from seisman

Uh oh!

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

Assignees

@Esteban82 Esteban82

Labels

add-changelog Add PR to the changelog AI-assisted All (or most) of the code was written by Artificial Intelligence. 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.

3 participants

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