Skip to content

Deprecate the ugly perspective -JG syntax and introduce a modern form - #5780

Merged
PaulWessel merged 11 commits into
masterfrom
modern-perspective-syntax
Sep 20, 2021
Merged

PaulWessel merged 11 commits into
masterfrom
modern-perspective-syntax

Conversation

@PaulWessel

Copy link
Copy Markdown
Contributor

While this is backwards compatible, the new form uses optional modifiers. This PR updates the documentation, the example script in the cookbook, but have not changed the test scripts (yet) to make sure both forms work.

New syntax

-Jg|Glon0/lat0/scale|width[+aazimuth][+ttilt][+vvwidth/vheight][+wtwist][+zaltitude]

Old syntax

-Jg|Glon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale|width

I have added three new tests that explores variations in azimuth, altitude, and view window. I will add similar tests for twist and tilt later.
The documentation, doc examples, doc scripts and animations using the perspective projection have been updated to reflect the new syntax. We will leave old tests scripts for backwards testing and add new scripts using the modernized format.

While this is backwards compatible, the new form uses optional modifiers.  This PR updates the documentation, the example script in the cookbook, but have not changed the test scripts (yet) to make sure both forms work.
@PaulWessel PaulWessel added documentation Improve documentation maintenance Boring but important stuff for the core devs labels Sep 18, 2021
@PaulWessel PaulWessel self-assigned this Sep 18, 2021
@PaulWessel PaulWessel changed the title WIP Deprecate the ugly perspective -JG syntax and introduce a modern form Deprecate the ugly perspective -JG syntax and introduce a modern form Sep 18, 2021
@maxrjones maxrjones added add-changelog Add PR to the changelog deprecation Deprecating a feature labels Sep 19, 2021
@PaulWessel

Copy link
Copy Markdown
Contributor Author

While @Esteban82 has approved this one (since it works), if anyone has comments or changes to the particular choices of modifiers then now is a good time. FYI, here is the three test results for varying altitude, azimuth, and view restriction:

Altitude:
altitude

Azimuth:
azimuth

View:
view

Comment thread doc/rst/source/explain_-J.rst_ Resolved

@maxrjones maxrjones left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

New syntax looks nice. I did not test it since that's already been done.

@PaulWessel
PaulWessel merged commit 582b590 into master Sep 20, 2021
@PaulWessel
PaulWessel deleted the modern-perspective-syntax branch September 20, 2021 01:43
@Esteban82

Copy link
Copy Markdown
Member

Is this supposed to work this way? I get a flip image when I add +du to the width

gmt grdimage -JG-73/40/20c+du+z160+a210+t55+v36 -Rg @earth_relief_02m -png Test

Test

This branch was previously deployed

1 inactive deployment
Preview — 6898eda6 Deployed Sep 20, 2021 by vercel[bot]
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 deprecation Deprecating a feature documentation Improve documentation maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants