Skip to content

Conversation

@yvonnefroehlich
Copy link
Member

@yvonnefroehlich yvonnefroehlich commented Dec 20, 2025

Description of proposed changes

Include the folder (https://github.com/GenericMappingTools/gmt/tree/master/share/cpt) in the colormap name in the examples

  • intros
  • tutorials
  • gallery
  • src
  • tests
  • datasets
  • technical references
  • contributing guide

Fixes #4308

Preview:

Guidelines

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

@yvonnefroehlich yvonnefroehlich added this to the 0.18.0 milestone Dec 20, 2025
@yvonnefroehlich yvonnefroehlich self-assigned this Dec 20, 2025
@yvonnefroehlich yvonnefroehlich added documentation Improvements or additions to documentation maintenance Boring but important stuff for the core devs labels Dec 20, 2025
@yvonnefroehlich yvonnefroehlich changed the title Intros / Tutorials / Gallery: Include folder in colormap name WIP: Intros / Tutorials / Gallery: Include folder in colormap name Dec 20, 2025
)

# ============
# Create a colorbar suitable for surface topography - oleron
Copy link
Member Author

Choose a reason for hiding this comment

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

How do we want to update the comments? For new users the leading folder could be unclear. Edit maybe we don not need the "by Fabio Crameri" each time?

Suggested change
# Create a colorbar suitable for surface topography - oleron
# Create a colorbar suitable for surface topography - oleron from the Scientific colour maps (SCM) by Fabio Crameri

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to explain it each time, just changing oleron to SCM/oleron.

@seisman
Copy link
Member

seisman commented Dec 21, 2025

Still need to update following lines:

pygmt/src/grd2cpt.py:180:        a categorical color table, like ``cmap="categorical"``.
pygmt/src/makecpt.py:165:        a categorical color table, like ``cmap="categorical"``.
pygmt/tests/test_makecpt.py:149:    makecpt(cmap="categorical", categorical=True, series=[0, 6, 1])
doc/techref/justification_codes.md:108:fig.colorbar(cmap="buda", frame=0, position="jMC+w10c/2c+h")
doc/contributing.md:692:    fig_ref.grdimage("@earth_relief_01d_g", projection="W120/15c", cmap="geo")
doc/contributing.md:693:    fig_test.grdimage(grid, projection="W120/15c", cmap="geo")

Perhaps also update turbo to google/turbo in the following lines:

pygmt/datasets/mercury_relief.py:62:    ``cmap="@mercury_relief.cpt"``, otherwise GMT's default CPT (*turbo*) will be used.
pygmt/datasets/earth_age.py:50:    ``cmap="@earth_age.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If
pygmt/datasets/moon_relief.py:63:    ``cmap="@moon_relief.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If
pygmt/datasets/earth_mean_dynamic_topography.py:48:    ``cmap="@earth_mdt.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If
pygmt/datasets/pluto_relief.py:61:    ``cmap="@pluto_relief.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If
pygmt/datasets/earth_mean_sea_surface.py:50:    ``cmap="@earth_mss.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If
pygmt/datasets/mars_relief.py:63:    ``cmap="@mars_relief.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If
pygmt/datasets/venus_relief.py:50:    ``cmap="@venus_relief.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If
pygmt/datasets/earth_dist.py:50:    ``cmap="@earth_dist.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If
pygmt/datasets/earth_relief.py:70:    dataset-specific CPT when plotting the dataset, explicitly set ``cmap="geo"``,
pygmt/datasets/earth_deflection.py:58:    ``cmap="@earth_defl.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If
pygmt/datasets/earth_vertical_gravity_gradient.py:50:    ``cmap="@earth_vgg.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize the use of GMT built-in CPT names in PyGMT examples

3 participants