Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved synopsis and usage of -Ccpt for grid plot modules #8165

Merged
merged 4 commits into from
Dec 9, 2023

Conversation

PaulWessel
Copy link
Member

The grid plotters grd2kml, grdimage, grdview, and grdvector may take a bit more complicated CPT argument. This is now documented better via API function gmt_explain_cpt_input and RST include file use_cpt_grd.rst_. Also standardised these four's synopsis syntax via a new constant CPT_OPT_ARGS.
While making C changes this is all about documentation only. For instance, the grd2kml usage message looks like this:

-C[<section>/]<master>|<cpt>|<*color1,color2[,color3,...][+h[<hinge>]][+i<dz>][+u|U<unit>][+s<fname>]
     Color palette file to convert grid values to colors, provided by one of three ways:
       • Name one of the master CPTs (no extension) [turbo].
       • Name a local regular CPTs (with extension).
       • Specify <color1>,<color2>[,<color3>,...] to build a linear continuous CPT to automatically assign continuous colors over the grid data range.
     A few modifiers control generation of the active CPT:
       +h Enable a soft hinge in your master CPT. Append <hinge> to change its value.
       +i Append <dz> to quantize the grid range [Default uses the exact grid range].
       +u Scale CPT z-values from another <unit> to meters.
       +U Scale CPT z-values from meters to another <unit>.
       +s Append <fname> to save the generated CPT to file.
     Note: For converting units with +u|U, see units e|f|k|M|n|u.

and the man page looks like this now:

C

The grid plotters grd2kml, grdimage, grdview, and grdvector takes a bit more complicated CPT argument.  This is not documented better via API function gmt_explain_cpt_input and RST include file use_cpt_grd.rst_
Also fixed up synopsis syntax via constant CPT_OPT_ARGS.
Ensure Unit link is employed in those 5 files.
@PaulWessel PaulWessel added the documentation Improve documentation label Dec 9, 2023
@PaulWessel PaulWessel added this to the 6.5.0 milestone Dec 9, 2023
@PaulWessel PaulWessel requested review from rbdavis and a team December 9, 2023 10:54
@PaulWessel PaulWessel self-assigned this Dec 9, 2023
@PaulWessel PaulWessel merged commit 5315bb4 into master Dec 9, 2023
6 checks passed
@PaulWessel PaulWessel deleted the improved-cpt-usage branch December 9, 2023 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improve documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant