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

Update modern mode script given -H option to makecpt/grd2cpt #827

Merged
merged 6 commits into from
Jun 4, 2019

Conversation

PaulWessel
Copy link
Member

Most modern mode scripts needed to use the current CPT mechanism. However, a few that were written as classic scripts (multiple CPTs) or animation scripts (each frame is its own session so cannot use current cpt from another session) we now add -H to write that CPT to stdout. Back to my 19 test failures.

@PaulWessel PaulWessel requested a review from a team June 4, 2019 21:40
@PaulWessel PaulWessel merged commit e176a96 into master Jun 4, 2019
@PaulWessel PaulWessel deleted the AddHoption branch June 4, 2019 23:23
weiji14 added a commit to weiji14/pygmt that referenced this pull request Oct 3, 2019
Allow makecpt to save the generated color palette table to a file via the output (H) argument. The 'H' setting in GMT upstream (see https://docs.generic-mapping-tools.org/latest/makecpt.html#h) is actually a flag to force the creation of an output (to stdout) in modern mode. Here we use it to set the filename too.

See also GenericMappingTools/gmt#827 and GenericMappingTools/gmt#823
weiji14 added a commit to GenericMappingTools/pygmt that referenced this pull request Oct 10, 2019
* Wrap makecpt

Initial commit for wrapping the makecpt function raised at #214, tentatively implemented here under the mathops.py file which will hold functions for "Mathematical operations on tables or grids", but with documentation placed under 'Plotting'. Original GMT `makecpt` documentation can be found at https://docs.generic-mapping-tools.org/latest/makecpt.html.

Tests are stored under test_makecpt.py, and there are now some basic tests ensuring that we can change the color when plotting points and grids. Current implementation uses 'cmap' and 'series' as aliases for 'C' and 'T' respectively.

* Enable makecpt to save to a cpt file via output (H) parameter

Allow makecpt to save the generated color palette table to a file via the output (H) argument. The 'H' setting in GMT upstream (see https://docs.generic-mapping-tools.org/latest/makecpt.html#h) is actually a flag to force the creation of an output (to stdout) in modern mode. Here we use it to set the filename too.

See also GenericMappingTools/gmt#827 and GenericMappingTools/gmt#823

* Add truncate (G) alias for makecpt

With rainbow cmap checks to test various zlow/zhigh combinations.

* Add reverse (I) alias for makecpt

Used 'earth' cmap to test various reversed colormap examples.

* Alias continuous (Z) for makecpt

Included one test to create a continuous cpt from blue to white. Also updated link to the full list of GMT's color palette tables due to documentation reorganization during GenericMappingTools/gmt#1594.
obaney pushed a commit to obaney/gmt that referenced this pull request Aug 18, 2021
- Use SI units
- Improve some comments
- Improve some external references
- Improve some stylings
- Remove some links to the GMT documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant