Skip to content

Let -X -Y also handle multipliers and not just divisors#6305

Merged
PaulWessel merged 2 commits intomasterfrom
improve-XY
Feb 7, 2022
Merged

Let -X -Y also handle multipliers and not just divisors#6305
PaulWessel merged 2 commits intomasterfrom
improve-XY

Conversation

@PaulWessel
Copy link
Member

This PR extends the modern form of -X -Y to allow not just fractions of previous plot dimensions w and h to be used but also arbitrary factors. The new full form of these arguments are

[[±][f]w[/d]±]xoff
[[±][f]h[/d]±]yoff

where the new f is an optional scale [1] that compliments the optional divisor d [1]. A simple example shows the parsing works:

gmt begin t png
	gmt psbasemap -R0/10/0/5 -Jx1c -Bafg1
	gmt psbasemap -Bafg1 -X2w/2+1 -Y2h/2+1
gmt end show

t

Here, the processing of f and d cancels out to give one w and one h, plus 1 cm.

This PR extends the modern form of -X -Y to allow not just fractions of previous plot dimensions w and h to be used but also arbitrary factors.
@PaulWessel PaulWessel added the enhancement Improving an existing feature label Feb 5, 2022
@PaulWessel PaulWessel added this to the 6.4.0 milestone Feb 5, 2022
@PaulWessel PaulWessel requested a review from maxrjones February 5, 2022 19:53
@PaulWessel PaulWessel self-assigned this Feb 5, 2022
@maxrjones maxrjones added the add-changelog Add PR to the changelog label Feb 7, 2022
@PaulWessel PaulWessel merged commit bbb2b60 into master Feb 7, 2022
@PaulWessel PaulWessel deleted the improve-XY branch February 7, 2022 19:26
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 enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants