diff --git a/doc/contributing.md b/doc/contributing.md index 7fd0ebde694..0d5d640e5bf 100644 --- a/doc/contributing.md +++ b/doc/contributing.md @@ -689,7 +689,7 @@ def test_my_plotting_case(): Test that my plotting method works. """ fig_ref, fig_test = Figure(), Figure() - fig_ref.grdimage("@earth_relief_01d_g", projection="W120/15c", cmap="geo") - fig_test.grdimage(grid, projection="W120/15c", cmap="geo") + fig_ref.grdimage("@earth_relief_01d_g", projection="W120/15c", cmap="gmt/geo") + fig_test.grdimage(grid, projection="W120/15c", cmap="gmt/geo") return fig_ref, fig_test ``` diff --git a/doc/techref/justification_codes.md b/doc/techref/justification_codes.md index 5546d0e2ca8..0dccd539360 100644 --- a/doc/techref/justification_codes.md +++ b/doc/techref/justification_codes.md @@ -105,7 +105,7 @@ Script showing justification codes for plot embellishments, e.g., a colorbar. fig = pygmt.Figure() fig.basemap(projection="X10c/2c", region=[-size, size, -size, size], frame=0) -fig.colorbar(cmap="buda", frame=0, position="jMC+w10c/2c+h") +fig.colorbar(cmap="SCM/buda", frame=0, position="jMC+w10c/2c+h") for code in codes: fig.text( diff --git a/examples/gallery/3d_plots/grdview_surface.py b/examples/gallery/3d_plots/grdview_surface.py index 9b5bbdede1d..cfbeca1f5a0 100644 --- a/examples/gallery/3d_plots/grdview_surface.py +++ b/examples/gallery/3d_plots/grdview_surface.py @@ -52,7 +52,7 @@ def ackley(x, y): projection=f"x{SCALE}c", zscale=f"{SCALE}c", surftype="s", - cmap="roma", + cmap="SCM/roma", perspective=[135, 30], # Azimuth southeast (135°), at elevation 30° shading="+a45", ) diff --git a/examples/gallery/3d_plots/scatter3d.py b/examples/gallery/3d_plots/scatter3d.py index d76a5016171..cf1538a83db 100644 --- a/examples/gallery/3d_plots/scatter3d.py +++ b/examples/gallery/3d_plots/scatter3d.py @@ -54,7 +54,7 @@ # palette "cubhelix" in categorical format and add the species names as # annotations for the colorbar pygmt.makecpt( - cmap="cubhelix", + cmap="cpt-city/cubhelix", # Use the minimum and maximum of the categorical number code # to set the lowest_value and the highest_value of the CPT series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1), diff --git a/examples/gallery/basemaps/ternary.py b/examples/gallery/basemaps/ternary.py index 2f5ae65b5b3..7b225618154 100644 --- a/examples/gallery/basemaps/ternary.py +++ b/examples/gallery/basemaps/ternary.py @@ -22,7 +22,7 @@ # Define a colormap to be used for the values given in the fourth column # of the input dataset -pygmt.makecpt(cmap="batlow", series=[0, 80, 10]) +pygmt.makecpt(cmap="SCM/batlow", series=[0, 80, 10]) fig.ternary( data, diff --git a/examples/gallery/embellishments/colorbar.py b/examples/gallery/embellishments/colorbar.py index c97f8b42838..24bcd304129 100644 --- a/examples/gallery/embellishments/colorbar.py +++ b/examples/gallery/embellishments/colorbar.py @@ -35,12 +35,12 @@ # Colorbar is placed at Bottom Center (BC) by default if no position is given # Add quantity and unit as labels ("+l") to the x and y axes # Add annotations ("+a") in steps of 0.5 and ticks ("+f") in steps of 0.1 -fig.colorbar(cmap="roma", frame=["xa0.5f0.1+lVelocity", "y+lm/s"]) +fig.colorbar(cmap="SCM/roma", frame=["xa0.5f0.1+lVelocity", "y+lm/s"]) # ============ # Create a colorbar showing the scientific rainbow - batlow fig.colorbar( - cmap="batlow", + cmap="SCM/batlow", # Colorbar positioned at map coordinates (g) longitude/latitude 0.3/8.7, # with a length/width (+w) of 4 cm by 0.5 cm, and plotted horizontally (+h) position="g0.3/8.7+w4c/0.5c+h", @@ -52,7 +52,7 @@ # ============ # Create a colorbar suitable for surface topography - oleron fig.colorbar( - cmap="oleron", + cmap="SCM/oleron", # Colorbar placed outside the plot bounding box (J) at Middle Right (MR), # offset (+o) by 1 cm horizontally and 0 cm vertically from anchor point, # with a length/width (+w) of 7 cm by 0.5 cm and a box for NaN values (+n) @@ -68,7 +68,7 @@ # Create a colorbar suitable for categorical data - hawaii # Set up the colormap pygmt.makecpt( - cmap="hawaii", + cmap="SCM/hawaii", series=[0, 3, 1], # Comma-separated string for the annotations of the colorbar color_model="+cA,B,C,D", diff --git a/examples/gallery/embellishments/colorbars_multiple.py b/examples/gallery/embellishments/colorbars_multiple.py index 4a9b149ed11..de3eb3f6d0a 100644 --- a/examples/gallery/embellishments/colorbars_multiple.py +++ b/examples/gallery/embellishments/colorbars_multiple.py @@ -28,7 +28,7 @@ # Activate the first panel so that the colormap created by the makecpt # function is a panel-level CPT with fig.set_panel(panel=0): - pygmt.makecpt(cmap="geo", series=[-8000, 8000]) + pygmt.makecpt(cmap="gmt/geo", series=[-8000, 8000]) # "R?" means Winkel Tripel projection with map width automatically # determined from the subplot width. fig.grdimage(grid=grid_globe, projection="R?", region="g", frame="a") @@ -36,7 +36,7 @@ # Activate the second panel so that the colormap created by the makecpt # function is a panel-level CPT with fig.set_panel(panel=1): - pygmt.makecpt(cmap="globe", series=[-6000, 3000]) + pygmt.makecpt(cmap="gmt/globe", series=[-6000, 3000]) # "M?" means Mercator projection with map width also automatically # determined from the subplot width. fig.grdimage(grid=grid_subset, projection="M?", region=subset_region, frame="a") diff --git a/examples/gallery/histograms/blockm.py b/examples/gallery/histograms/blockm.py index af8b6ec1655..ba509d6dc0c 100644 --- a/examples/gallery/histograms/blockm.py +++ b/examples/gallery/histograms/blockm.py @@ -33,7 +33,7 @@ grid=grd, region=region, frame=["af", "+tMean earthquake depth inside each block"], - cmap="batlow", + cmap="SCM/batlow", ) # Plot slightly transparent landmasses on top fig.coast(land="darkgray", transparency=40) @@ -52,7 +52,7 @@ grid=grd, region=region, frame=["af", "+tNumber of points inside each block"], - cmap="batlow", + cmap="SCM/batlow", ) fig.coast(land="darkgray", transparency=40) fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="1p,black") diff --git a/examples/gallery/images/cross_section.py b/examples/gallery/images/cross_section.py index 0c9620fa54b..d55f68574e1 100644 --- a/examples/gallery/images/cross_section.py +++ b/examples/gallery/images/cross_section.py @@ -37,7 +37,7 @@ grid_map = pygmt.datasets.load_earth_relief(resolution="10m", region=region_map) # Plot the downloaded grid with color-coding based on the elevation -fig.grdimage(grid=grid_map, cmap="oleron") +fig.grdimage(grid=grid_map, cmap="SCM/oleron") # Add a colorbar for the elevation fig.colorbar( diff --git a/examples/gallery/images/grdclip.py b/examples/gallery/images/grdclip.py index e4a63931cff..b034c20223a 100644 --- a/examples/gallery/images/grdclip.py +++ b/examples/gallery/images/grdclip.py @@ -25,7 +25,7 @@ projection="M12c", frame=["WSne+toriginal grid", "xa5f1", "ya2f1"], ) -fig.grdimage(grid=grid, cmap="oleron") +fig.grdimage(grid=grid, cmap="SCM/oleron") # Shift plot origin of the second map by "width of the first map + 0.5 cm" # in x-direction diff --git a/examples/gallery/images/grdgradient.py b/examples/gallery/images/grdgradient.py index 668cb5dd76c..89ded87ca46 100644 --- a/examples/gallery/images/grdgradient.py +++ b/examples/gallery/images/grdgradient.py @@ -30,7 +30,7 @@ # --------------- plotting the original Data Elevation Model ----------- -pygmt.makecpt(cmap="gray", series=[200, 4000, 10]) +pygmt.makecpt(cmap="gmt/gray", series=[200, 4000, 10]) fig.grdimage( grid=grid, projection="M12c", @@ -45,7 +45,7 @@ # Shift plot origin of the second map by 12.5 cm in x-direction fig.shift_origin(xshift="12.5c") -pygmt.makecpt(cmap="gray", series=[-1.5, 0.3, 0.01]) +pygmt.makecpt(cmap="gmt/gray", series=[-1.5, 0.3, 0.01]) fig.grdimage( grid=dgrid, projection="M12c", diff --git a/examples/gallery/images/grdgradient_shading.py b/examples/gallery/images/grdgradient_shading.py index 01efc1fa0d8..1763f9ee7f1 100644 --- a/examples/gallery/images/grdgradient_shading.py +++ b/examples/gallery/images/grdgradient_shading.py @@ -27,7 +27,7 @@ fig = pygmt.Figure() # Define a colormap to be used for topography -pygmt.makecpt(cmap="terra", series=[-7000, 7000]) +pygmt.makecpt(cmap="gmt/terra", series=[-7000, 7000]) # Define figure configuration pygmt.config(FONT_TITLE="10p,5", MAP_TITLE_OFFSET="1p", MAP_FRAME_TYPE="plain") diff --git a/examples/gallery/images/grdlandmask.py b/examples/gallery/images/grdlandmask.py index 674af87850e..323b00392c9 100644 --- a/examples/gallery/images/grdlandmask.py +++ b/examples/gallery/images/grdlandmask.py @@ -30,7 +30,7 @@ # use color_model="+cwater,land" to write the discrete color palette # "batlow" in categorical format and add water/land as annotations for the # colorbar. -pygmt.makecpt(cmap="batlow", series=(0, 1, 1), color_model="+cwater,land") +pygmt.makecpt(cmap="SCM/batlow", series=(0, 1, 1), color_model="+cwater,land") fig.grdimage(grid=grid, cmap=True) fig.colorbar(position="JMR+o0.5c/0c+w8c") diff --git a/examples/gallery/images/track_sampling.py b/examples/gallery/images/track_sampling.py index c7cb87fdabb..f1681cd9e7d 100644 --- a/examples/gallery/images/track_sampling.py +++ b/examples/gallery/images/track_sampling.py @@ -29,7 +29,7 @@ # Plot the earth relief grid on Cylindrical Stereographic projection, masking # land areas fig.basemap(region="g", projection="Cyl_stere/150/-20/15c", frame=True) -fig.grdimage(grid=grid, cmap="gray") +fig.grdimage(grid=grid, cmap="gmt/gray") fig.coast(land="#666666") # Plot the sampled bathymetry points using circles (c) of 0.15 cm size # Points are colored using elevation values (normalized for visual purposes) @@ -37,7 +37,7 @@ x=track.longitude, y=track.latitude, style="c0.15c", - cmap="terra", + cmap="gmt/terra", fill=(track.bathymetry - track.bathymetry.mean()) / track.bathymetry.std(), ) fig.show() diff --git a/examples/gallery/lines/line_custom_cpt.py b/examples/gallery/lines/line_custom_cpt.py index cbb1d1b505a..a1a45920fe0 100644 --- a/examples/gallery/lines/line_custom_cpt.py +++ b/examples/gallery/lines/line_custom_cpt.py @@ -25,7 +25,7 @@ # Create a custom CPT with the batlow CPT and 10 discrete z-values (colors), # use color_model="+c0-9" to write the color palette in categorical format and # add labels (0) to (9) for the colorbar legend -pygmt.makecpt(cmap="batlow", series=[0, 9, 1], color_model="+c0-9") +pygmt.makecpt(cmap="SCM/batlow", series=[0, 9, 1], color_model="+c0-9") # Plot 10 lines and set a different z-value for each line for zvalue in range(10): diff --git a/examples/gallery/maps/choropleth_map.py b/examples/gallery/maps/choropleth_map.py index d03c6a988be..9eb3b05bece 100644 --- a/examples/gallery/maps/choropleth_map.py +++ b/examples/gallery/maps/choropleth_map.py @@ -29,7 +29,7 @@ fig.basemap(region=[-19.5, 53, -37.5, 38], projection="M10c", frame="+n") # First, we define the colormap to fill the polygons based on the "POP_EST" column. -pygmt.makecpt(cmap="acton", series=(0, 100), reverse=True) +pygmt.makecpt(cmap="SCM/acton", series=(0, 100), reverse=True) # Next, we plot the polygons and fill them using the defined colormap. The target column # is defined by the aspatial parameter. diff --git a/examples/gallery/symbols/bars.py b/examples/gallery/symbols/bars.py index 4d90bf54771..4867655acfb 100644 --- a/examples/gallery/symbols/bars.py +++ b/examples/gallery/symbols/bars.py @@ -24,7 +24,7 @@ fig = pygmt.Figure() -pygmt.makecpt(cmap="roma", series=[0, 4, 1]) +pygmt.makecpt(cmap="SCM/roma", series=[0, 4, 1]) with fig.subplot( nrows=2, diff --git a/examples/gallery/symbols/points_categorical.py b/examples/gallery/symbols/points_categorical.py index f638e0d63af..d9098b29871 100644 --- a/examples/gallery/symbols/points_categorical.py +++ b/examples/gallery/symbols/points_categorical.py @@ -64,7 +64,7 @@ # palette "inferno" in categorical format and add the species names as # annotations for the colorbar pygmt.makecpt( - cmap="inferno", + cmap="matplotlib/inferno", # Use the minimum and maximum of the categorical number code # to set the lowest_value and the highest_value of the CPT series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1), diff --git a/examples/intro/02_contour_map.py b/examples/intro/02_contour_map.py index 4a9062916be..3868f1a45fd 100644 --- a/examples/intro/02_contour_map.py +++ b/examples/intro/02_contour_map.py @@ -43,7 +43,7 @@ # "oleron" is used; a full list of CPTs can be found at :gmt-docs:`reference/cpts.html`. fig = pygmt.Figure() -fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") +fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="SCM/oleron") fig.show() @@ -64,7 +64,7 @@ # :meth:`pygmt.Figure.grdimage`. fig = pygmt.Figure() -fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") +fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="SCM/oleron") fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) fig.show() @@ -85,7 +85,7 @@ # lines can be adjusted (separately) by specifying the desired ``pen``. fig = pygmt.Figure() -fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") +fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="SCM/oleron") fig.grdcontour(grid=grid, levels=500, annotation=1000) fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) fig.show() @@ -100,7 +100,7 @@ # the ``shorelines`` parameter draws a border around the islands. fig = pygmt.Figure() -fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="oleron") +fig.grdimage(grid=grid, frame="a", projection="M10c", cmap="SCM/oleron") fig.grdcontour(grid=grid, levels=500, annotation=1000) fig.coast(shorelines="2p", land="lightgray") fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) diff --git a/examples/tutorials/advanced/3d_perspective_image.py b/examples/tutorials/advanced/3d_perspective_image.py index 00669645d7a..9bd4a1393b5 100644 --- a/examples/tutorials/advanced/3d_perspective_image.py +++ b/examples/tutorials/advanced/3d_perspective_image.py @@ -50,7 +50,7 @@ # Set the surftype to "surface" surftype="s", # Set the CPT to "geo" - cmap="geo", + cmap="gmt/geo", ) fig.show() @@ -66,7 +66,7 @@ projection="M15c", zsize="1.5c", surftype="s", - cmap="geo", + cmap="gmt/geo", plane=1000, # Set the plane elevation to 1,000 meters facade_fill="gray", # Color the facade in "gray" ) @@ -89,7 +89,7 @@ projection="M15c", zsize="1.5c", surftype="s", - cmap="geo", + cmap="gmt/geo", plane=1000, facade_fill="gray", # Set the contour pen thickness to 0.1 points diff --git a/examples/tutorials/advanced/contour_map.py b/examples/tutorials/advanced/contour_map.py index 7e6e6361c62..f36739822ef 100644 --- a/examples/tutorials/advanced/contour_map.py +++ b/examples/tutorials/advanced/contour_map.py @@ -84,7 +84,7 @@ # :meth:`pygmt.Figure.colorbar` method. fig = pygmt.Figure() -fig.grdimage(grid=grid, cmap="haxby", projection="M10c", frame=True) +fig.grdimage(grid=grid, cmap="gmt/haxby", projection="M10c", frame=True) fig.grdcontour(grid=grid, annotation=1000, levels=250, limit=[-4000, -2000]) fig.colorbar(frame=["x+lelevation", "y+lm"]) fig.show() diff --git a/examples/tutorials/advanced/draping_on_3d_surface.py b/examples/tutorials/advanced/draping_on_3d_surface.py index 21131e79ec7..abe5f058dae 100644 --- a/examples/tutorials/advanced/draping_on_3d_surface.py +++ b/examples/tutorials/advanced/draping_on_3d_surface.py @@ -50,7 +50,7 @@ # Set up colormap for the crustal age pygmt.config(COLOR_NAN="lightgray") -pygmt.makecpt(cmap="batlow", series=[0, 200, 1], reverse=True, overrule_bg=True) +pygmt.makecpt(cmap="SCM/batlow", series=[0, 200, 1], reverse=True, overrule_bg=True) fig.grdview( projection="M12c", # Mercator projection with a width of 12 centimeters diff --git a/examples/tutorials/advanced/earth_relief.py b/examples/tutorials/advanced/earth_relief.py index 30e668bb2b2..4038eb6ebb9 100644 --- a/examples/tutorials/advanced/earth_relief.py +++ b/examples/tutorials/advanced/earth_relief.py @@ -52,14 +52,14 @@ # Using the *geo* CPT: fig = pygmt.Figure() -fig.grdimage(grid=grid, projection="R12c", cmap="geo") +fig.grdimage(grid=grid, projection="R12c", cmap="gmt/geo") fig.show() # %% # Using the *relief* CPT: fig = pygmt.Figure() -fig.grdimage(grid=grid, projection="R12c", cmap="relief") +fig.grdimage(grid=grid, projection="R12c", cmap="gmt/relief") fig.show() @@ -76,7 +76,7 @@ # ``"y+lm"`` sets the y-axis label. fig = pygmt.Figure() -fig.grdimage(grid=grid, projection="R12c", cmap="geo") +fig.grdimage(grid=grid, projection="R12c", cmap="gmt/geo") fig.colorbar(frame=["a2500", "x+lElevation", "y+lm"]) fig.show() @@ -96,7 +96,7 @@ grid = pygmt.datasets.load_earth_relief(resolution="10m", region=[-14, 30, 35, 60]) fig = pygmt.Figure() -fig.grdimage(grid=grid, projection="M15c", frame="a", cmap="geo") +fig.grdimage(grid=grid, projection="M15c", frame="a", cmap="gmt/geo") fig.colorbar(frame=["a1000", "x+lElevation", "y+lm"]) fig.show() diff --git a/examples/tutorials/advanced/focal_mechanisms.py b/examples/tutorials/advanced/focal_mechanisms.py index 227dade2877..d4f76e49d7d 100644 --- a/examples/tutorials/advanced/focal_mechanisms.py +++ b/examples/tutorials/advanced/focal_mechanisms.py @@ -308,7 +308,7 @@ fig.coast(region="d", projection="N10c", land="lightgray", frame=True) # Set up colormap and colorbar for hypocentral depth -pygmt.makecpt(cmap="lajolla", series=[0, 20]) +pygmt.makecpt(cmap="SCM/lajolla", series=[0, 20]) fig.colorbar(frame=["x+lhypocentral depth", "y+lkm"]) fig.meca( diff --git a/examples/tutorials/advanced/grid_equalization.py b/examples/tutorials/advanced/grid_equalization.py index 1370ff3ab3e..8ded7692c28 100644 --- a/examples/tutorials/advanced/grid_equalization.py +++ b/examples/tutorials/advanced/grid_equalization.py @@ -35,7 +35,7 @@ # Define figure configuration pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") # Define the colormap for the figure -pygmt.makecpt(series=[500, 3540], cmap="turku") +pygmt.makecpt(series=[500, 3540], cmap="SCM/turku") # Setup subplots with two panels with fig.subplot( nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Digital Elevation Model" @@ -104,7 +104,7 @@ # Define figure configuration pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") # Define the colormap for the figure -pygmt.makecpt(series=[0, divisions, 1], cmap="lajolla") +pygmt.makecpt(series=[0, divisions, 1], cmap="SCM/lajolla") # Setup subplots with two panels with fig.subplot( nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Linear distribution" @@ -154,7 +154,7 @@ # Define figure configuration pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") # Define the colormap for the figure -pygmt.makecpt(series=[-4.5, 4.5], cmap="vik") +pygmt.makecpt(series=[-4.5, 4.5], cmap="SCM/vik") # Setup subplots with two panels with fig.subplot( nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Normal distribution" @@ -218,7 +218,7 @@ # Define figure configuration pygmt.config(FORMAT_GEO_MAP="ddd.x", MAP_FRAME_TYPE="plain") # Define the colormap for the figure -pygmt.makecpt(series=[0, divisions, 1], cmap="lajolla") +pygmt.makecpt(series=[0, divisions, 1], cmap="SCM/lajolla") # Setup subplots with two panels with fig.subplot( nrows=1, ncols=2, figsize=("13.5c", "4c"), title="Quadratic distribution" diff --git a/examples/tutorials/advanced/working_with_panel.py b/examples/tutorials/advanced/working_with_panel.py index 53a4d2ec5c4..e9365489a94 100644 --- a/examples/tutorials/advanced/working_with_panel.py +++ b/examples/tutorials/advanced/working_with_panel.py @@ -123,7 +123,7 @@ def view(central_lon): fig = pygmt.Figure() # Set up a colormap for the elevation in meters pygmt.makecpt( - cmap="oleron", + cmap="SCM/oleron", # minimum, maximum, step series=[int(grd_relief.data.min()) - 1, int(grd_relief.data.max()) + 1, 100], ) diff --git a/examples/tutorials/basics/plot.py b/examples/tutorials/basics/plot.py index ab15b77c38a..27070e6137d 100644 --- a/examples/tutorials/basics/plot.py +++ b/examples/tutorials/basics/plot.py @@ -91,7 +91,9 @@ fig = pygmt.Figure() fig.basemap(region=region, projection="M15c", frame=True) fig.coast(land="black", water="skyblue") -pygmt.makecpt(cmap="viridis", series=[data.depth_km.min(), data.depth_km.max()]) +pygmt.makecpt( + cmap="matplotlib/viridis", series=[data.depth_km.min(), data.depth_km.max()] +) fig.plot( x=data.longitude, y=data.latitude, diff --git a/pygmt/datasets/earth_age.py b/pygmt/datasets/earth_age.py index 07070751c7e..39b8bee707d 100644 --- a/pygmt/datasets/earth_age.py +++ b/pygmt/datasets/earth_age.py @@ -47,8 +47,8 @@ def load_earth_age( This dataset comes with a color palette table (CPT) file, ``@earth_age.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@earth_age.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If - the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@earth_age.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. Refer to :gmt-datasets:`earth-age.html` for more details about available datasets, diff --git a/pygmt/datasets/earth_deflection.py b/pygmt/datasets/earth_deflection.py index b8b29ce8884..b59854118ef 100644 --- a/pygmt/datasets/earth_deflection.py +++ b/pygmt/datasets/earth_deflection.py @@ -55,8 +55,8 @@ def load_earth_deflection( This dataset comes with a color palette table (CPT) file, ``@earth_defl.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@earth_defl.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If - the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@earth_defl.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. Refer to :gmt-datasets:`earth-edefl.html` and :gmt-datasets:`earth-ndefl.html` for diff --git a/pygmt/datasets/earth_dist.py b/pygmt/datasets/earth_dist.py index 6484be50d0d..1e1f16d1df8 100644 --- a/pygmt/datasets/earth_dist.py +++ b/pygmt/datasets/earth_dist.py @@ -47,8 +47,8 @@ def load_earth_dist( This dataset comes with a color palette table (CPT) file, ``@earth_dist.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@earth_dist.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If - the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@earth_dist.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. Refer to :gmt-datasets:`earth-dist.html` for more details about available datasets, diff --git a/pygmt/datasets/earth_free_air_anomaly.py b/pygmt/datasets/earth_free_air_anomaly.py index ce8ee2e2fef..988e3d60960 100644 --- a/pygmt/datasets/earth_free_air_anomaly.py +++ b/pygmt/datasets/earth_free_air_anomaly.py @@ -56,9 +56,9 @@ def load_earth_free_air_anomaly( This dataset comes with two color palette table (CPT) files, ``@earth_faa.cpt`` and ``@earth_faaerror.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set ``cmap="@earth_faa.cpt"`` or ``cmap="@earth_faaerror.cpt"``, - otherwise GMT's default CPT (*turbo*) will be used. If the dataset is referenced by - the file name in a grid plotting method, the dataset-specific CPT file is used - automatically unless another CPT is specified. + otherwise GMT's default CPT (*google/turbo*) will be used. If the dataset is + referenced by the file name in a grid plotting method, the dataset-specific CPT file + is used automatically unless another CPT is specified. Refer to :gmt-datasets:`earth-faa.html` and :gmt-datasets:`earth-faaerror.html` for more details about available datasets, including version information and references. diff --git a/pygmt/datasets/earth_magnetic_anomaly.py b/pygmt/datasets/earth_magnetic_anomaly.py index a0e7235fcd9..5f68602b5d4 100644 --- a/pygmt/datasets/earth_magnetic_anomaly.py +++ b/pygmt/datasets/earth_magnetic_anomaly.py @@ -58,9 +58,9 @@ def load_earth_magnetic_anomaly( ``data_source="emag2"`` and ``data_source="emag2_4km"``, and ``@earth_wdmam.cpt`` for ``data_source="wdmam"``. To use the dataset-specific CPT when plotting the dataset, explicitly set ``cmap="@earth_mag.cpt"`` or ``cmap="@earth_wdmam.cpt"``, - otherwise GMT's default CPT (*turbo*) will be used. If the dataset is referenced by - the file name in a grid plotting method, the dataset-specific CPT file is used - automatically unless another CPT is specified. + otherwise GMT's default CPT (*google/turbo*) will be used. If the dataset is + referenced by the file name in a grid plotting method, the dataset-specific CPT file + is used automatically unless another CPT is specified. Refer to :gmt-datasets:`earth-mag.html` and :gmt-datasets:`earth-wdmam.html` for more details about available datasets, including version information and references. diff --git a/pygmt/datasets/earth_mean_dynamic_topography.py b/pygmt/datasets/earth_mean_dynamic_topography.py index 63ac3cbcc8d..354f011748a 100644 --- a/pygmt/datasets/earth_mean_dynamic_topography.py +++ b/pygmt/datasets/earth_mean_dynamic_topography.py @@ -45,8 +45,8 @@ def load_earth_mean_dynamic_topography( This dataset comes with a color palette table (CPT) file, ``@earth_mdt.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@earth_mdt.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If - the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@earth_mdt.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. Refer to :gmt-datasets:`earth-mdt.html` for more details about available datasets, diff --git a/pygmt/datasets/earth_mean_sea_surface.py b/pygmt/datasets/earth_mean_sea_surface.py index e9a081f0949..b064246ecab 100644 --- a/pygmt/datasets/earth_mean_sea_surface.py +++ b/pygmt/datasets/earth_mean_sea_surface.py @@ -47,8 +47,8 @@ def load_earth_mean_sea_surface( This dataset comes with a color palette table (CPT) file, ``@earth_mss.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@earth_mss.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If - the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@earth_mss.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. Refer to :gmt-datasets:`earth-mss.html` for more details about available datasets, diff --git a/pygmt/datasets/earth_relief.py b/pygmt/datasets/earth_relief.py index 70d5a79d0da..176cf7bde0a 100644 --- a/pygmt/datasets/earth_relief.py +++ b/pygmt/datasets/earth_relief.py @@ -66,11 +66,11 @@ def load_earth_relief( omitted (i.e., ``@earth_relief``), GMT automatically selects a suitable resolution based on the current region and projection settings. - This dataset comes with a color palette table (CPT) file, ``geo``. To use the - dataset-specific CPT when plotting the dataset, explicitly set ``cmap="geo"``, - otherwise GMT's default CPT (*turbo*) will be used. If the dataset is referenced by - the file name in a grid plotting method, the dataset-specific CPT file is used - automatically unless another CPT is specified. + This dataset comes with a color palette table (CPT) file, ``gmt/geo``. To use the + dataset-specific CPT when plotting the dataset, explicitly set ``cmap="gmt/geo"``, + otherwise GMT's default CPT (*google/turbo*) will be used. If the dataset is + referenced by the file name in a grid plotting method, the dataset-specific CPT file + is used automatically unless another CPT is specified. Refer to :gmt-datasets:`earth-relief.html` for more details about available datasets, including version information and references. diff --git a/pygmt/datasets/earth_vertical_gravity_gradient.py b/pygmt/datasets/earth_vertical_gravity_gradient.py index 09d3a5df682..04b4d1cccb5 100644 --- a/pygmt/datasets/earth_vertical_gravity_gradient.py +++ b/pygmt/datasets/earth_vertical_gravity_gradient.py @@ -47,8 +47,8 @@ def load_earth_vertical_gravity_gradient( This dataset comes with a color palette table (CPT) file, ``@earth_vgg.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@earth_vgg.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If - the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@earth_vgg.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. Refer to :gmt-datasets:`earth-vgg.html` for more details about available diff --git a/pygmt/datasets/mars_relief.py b/pygmt/datasets/mars_relief.py index f63bd3cb9fb..318ff8367fc 100644 --- a/pygmt/datasets/mars_relief.py +++ b/pygmt/datasets/mars_relief.py @@ -60,8 +60,8 @@ def load_mars_relief( This dataset comes with a color palette table (CPT) file, ``@mars_relief.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@mars_relief.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If - the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@mars_relief.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. Refer to :gmt-datasets:`mars-relief.html` for more details about available datasets, diff --git a/pygmt/datasets/mercury_relief.py b/pygmt/datasets/mercury_relief.py index fb5ade05c3b..bad94cafe6d 100644 --- a/pygmt/datasets/mercury_relief.py +++ b/pygmt/datasets/mercury_relief.py @@ -59,8 +59,8 @@ def load_mercury_relief( This dataset comes with a color palette table (CPT) file, ``@mercury_relief.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@mercury_relief.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. - If the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@mercury_relief.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. Refer to :gmt-datasets:`mercury-relief.html` for more details about available diff --git a/pygmt/datasets/moon_relief.py b/pygmt/datasets/moon_relief.py index 7784508da0e..2a440f9600a 100644 --- a/pygmt/datasets/moon_relief.py +++ b/pygmt/datasets/moon_relief.py @@ -60,8 +60,8 @@ def load_moon_relief( This dataset comes with a color palette table (CPT) file, ``@moon_relief.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@moon_relief.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If - the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@moon_relief.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. Refer to :gmt-datasets:`moon-relief.html` for more details about available datasets, diff --git a/pygmt/datasets/pluto_relief.py b/pygmt/datasets/pluto_relief.py index 6f82f35462c..4eea2d7828e 100644 --- a/pygmt/datasets/pluto_relief.py +++ b/pygmt/datasets/pluto_relief.py @@ -58,8 +58,8 @@ def load_pluto_relief( This dataset comes with a color palette table (CPT) file, ``@pluto_relief.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@pluto_relief.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If - the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@pluto_relief.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. diff --git a/pygmt/datasets/venus_relief.py b/pygmt/datasets/venus_relief.py index 95c9eccd7a0..a83d5185018 100644 --- a/pygmt/datasets/venus_relief.py +++ b/pygmt/datasets/venus_relief.py @@ -47,8 +47,8 @@ def load_venus_relief( This dataset comes with a color palette table (CPT) file, ``@venus_relief.cpt``. To use the dataset-specific CPT when plotting the dataset, explicitly set - ``cmap="@venus_relief.cpt"``, otherwise GMT's default CPT (*turbo*) will be used. If - the dataset is referenced by the file name in a grid plotting method, the + ``cmap="@venus_relief.cpt"``, otherwise GMT's default CPT (*google/turbo*) will be + used. If the dataset is referenced by the file name in a grid plotting method, the dataset-specific CPT file is used automatically unless another CPT is specified. Refer to :gmt-datasets:`venus-relief.html` for more details about available diff --git a/pygmt/src/colorbar.py b/pygmt/src/colorbar.py index 3e7efb32984..0e29d53cb66 100644 --- a/pygmt/src/colorbar.py +++ b/pygmt/src/colorbar.py @@ -153,7 +153,7 @@ def colorbar( # noqa: PLR0913 >>> # Call the colorbar method for the plot >>> fig.colorbar( ... # Set cmap to the "roma" CPT - ... cmap="roma", + ... cmap="SCM/roma", ... # Label the x-axis "Velocity" and the y-axis "m/s" ... frame=["x+lVelocity", "y+lm/s"], ... ) diff --git a/pygmt/src/grd2cpt.py b/pygmt/src/grd2cpt.py index 964a25de64e..a09ac3aa4c2 100644 --- a/pygmt/src/grd2cpt.py +++ b/pygmt/src/grd2cpt.py @@ -177,7 +177,7 @@ def grd2cpt( Do not interpolate the input color table but pick the output colors starting at the beginning of the color table, until colors for all intervals are assigned. This is particularly useful in combination with - a categorical color table, like ``cmap="categorical"``. + a categorical color table, like ``cmap="gmt/categorical"``. cyclic : bool Produce a wrapped (cyclic) color table that endlessly repeats its range. Note that ``cyclic=True`` cannot be set together with diff --git a/pygmt/src/grdimage.py b/pygmt/src/grdimage.py index 563872fe775..c8e7f262557 100644 --- a/pygmt/src/grdimage.py +++ b/pygmt/src/grdimage.py @@ -164,7 +164,7 @@ def grdimage( # noqa: PLR0913 >>> fig = pygmt.Figure() >>> # pass in the grid and set the CPT to "geo" >>> # set the projection to Mollweide and the size to 10 cm - >>> fig.grdimage(grid=grid, cmap="geo", projection="W10c", frame="ag") + >>> fig.grdimage(grid=grid, cmap="gmt/geo", projection="W10c", frame="ag") >>> # show the plot >>> fig.show() """ diff --git a/pygmt/src/grdview.py b/pygmt/src/grdview.py index ebf820508fb..fc2bef99a20 100644 --- a/pygmt/src/grdview.py +++ b/pygmt/src/grdview.py @@ -167,7 +167,7 @@ def grdview( # noqa: PLR0913 ... # Set "surface plot" to color the surface via a CPT ... surftype="s", ... # Specify CPT to "geo" - ... cmap="geo", + ... cmap="gmt/geo", ... ) >>> # Show the plot >>> fig.show() diff --git a/pygmt/src/makecpt.py b/pygmt/src/makecpt.py index b2c36405840..4b9d3392927 100644 --- a/pygmt/src/makecpt.py +++ b/pygmt/src/makecpt.py @@ -162,7 +162,7 @@ def makecpt( Do not interpolate the input color table but pick the output colors starting at the beginning of the color table, until colors for all intervals are assigned. This is particularly useful in combination with - a categorical color table, like ``cmap="categorical"``. + a categorical color table, like ``cmap="gmt/categorical"``. cyclic : bool Produce a wrapped (cyclic) color table that endlessly repeats its range. Note that ``cyclic=True`` cannot be set together with diff --git a/pygmt/tests/test_colorbar.py b/pygmt/tests/test_colorbar.py index 3b132a5d64f..85925ae944a 100644 --- a/pygmt/tests/test_colorbar.py +++ b/pygmt/tests/test_colorbar.py @@ -13,7 +13,7 @@ def test_colorbar(): Create a simple colorbar. """ fig = Figure() - fig.colorbar(cmap="rainbow", position="x0c/0c+w4c", frame=True) + fig.colorbar(cmap="gmt/rainbow", position="x0c/0c+w4c", frame=True) return fig @@ -24,5 +24,5 @@ def test_colorbar_shading_list(): """ fig = Figure() fig.basemap(region=[0, 10, 0, 2], projection="X10c/2c", frame="a") - fig.colorbar(cmap="geo", shading=[-0.7, 0.2], frame=True) + fig.colorbar(cmap="gmt/geo", shading=[-0.7, 0.2], frame=True) return fig diff --git a/pygmt/tests/test_geopandas.py b/pygmt/tests/test_geopandas.py index 982ca868785..cccb95b28e2 100644 --- a/pygmt/tests/test_geopandas.py +++ b/pygmt/tests/test_geopandas.py @@ -200,7 +200,7 @@ def test_geopandas_plot_int_dtypes(gdf_ridge, dtype): # Plot figure with three polygons colored based on NPOINTS value fig = Figure() - makecpt(cmap="lisbon", series=[10, 60, 10], continuous=True) + makecpt(cmap="SCM/lisbon", series=[10, 60, 10], continuous=True) fig.plot( data=gdf, frame=True, @@ -231,7 +231,9 @@ def test_geopandas_plot_int64_as_float(gdf_ridge): # Plot figure with three polygons colored based on NPOINTS value fig = Figure() makecpt( - cmap="lisbon", series=[10 * factor, 60 * factor, 10 * factor], continuous=True + cmap="SCM/lisbon", + series=[10 * factor, 60 * factor, 10 * factor], + continuous=True, ) fig.plot( data=gdf, @@ -242,7 +244,7 @@ def test_geopandas_plot_int64_as_float(gdf_ridge): aspatial="Z=NPOINTS", ) # Generate a CPT for 10-60 range and plot to reuse the baseline image - makecpt(cmap="lisbon", series=[10, 60, 10], continuous=True) + makecpt(cmap="SCM/lisbon", series=[10, 60, 10], continuous=True) fig.colorbar() return fig diff --git a/pygmt/tests/test_grd2cpt.py b/pygmt/tests/test_grd2cpt.py index db8eecb73a4..38e35a919a2 100644 --- a/pygmt/tests/test_grd2cpt.py +++ b/pygmt/tests/test_grd2cpt.py @@ -71,4 +71,4 @@ def test_grd2cpt_categorical_and_cyclic(grid): Use incorrect setting by setting both categorical and cyclic to True. """ with pytest.raises(GMTInvalidInput): - grd2cpt(grid=grid, cmap="batlow", categorical=True, cyclic=True) + grd2cpt(grid=grid, cmap="SCM/batlow", categorical=True, cyclic=True) diff --git a/pygmt/tests/test_grdimage.py b/pygmt/tests/test_grdimage.py index b0d11c4bdd6..e8bc38f4734 100644 --- a/pygmt/tests/test_grdimage.py +++ b/pygmt/tests/test_grdimage.py @@ -60,7 +60,7 @@ def test_grdimage(grid): Plot an image using an xarray grid. """ fig = Figure() - fig.grdimage(grid, cmap="earth", projection="W0/10c") + fig.grdimage(grid, cmap="gmt/earth", projection="W0/10c") return fig @@ -71,7 +71,7 @@ def test_grdimage_slice(grid): """ grid_ = grid.sel(lat=slice(-30, 30)) fig = Figure() - fig.grdimage(grid_, cmap="earth", projection="M10c") + fig.grdimage(grid_, cmap="gmt/earth", projection="M10c") return fig @@ -83,7 +83,7 @@ def test_grdimage_file(): fig = Figure() fig.grdimage( "@earth_relief_01d_g", - cmap="ocean", + cmap="gmt/ocean", region=[-180, 180, -70, 70], projection="W0/10c", shading=True, @@ -102,7 +102,7 @@ def test_grdimage_default_no_shading(grid, shading): """ grid_ = grid.sel(lat=slice(-30, 30)) fig = Figure() - fig.grdimage(grid_, cmap="earth", projection="M10c", shading=shading) + fig.grdimage(grid_, cmap="gmt/earth", projection="M10c", shading=shading) return fig @@ -143,10 +143,10 @@ def test_grdimage_grid_and_shading_with_xarray(grid, xrgrid): """ fig_ref, fig_test = Figure(), Figure() fig_ref.grdimage( - grid="@earth_relief_01d_g", region="GL", cmap="geo", shading=xrgrid + grid="@earth_relief_01d_g", region="GL", cmap="gmt/geo", shading=xrgrid ) fig_ref.colorbar() - fig_test.grdimage(grid=grid, region="GL", cmap="geo", shading=xrgrid) + fig_test.grdimage(grid=grid, region="GL", cmap="gmt/geo", shading=xrgrid) fig_test.colorbar() return fig_ref, fig_test @@ -195,7 +195,7 @@ def test_grdimage_global_subset(grid_360): fig = Figure() fig.grdimage( - grid=sliced_grid, cmap="vik", region="g", projection="W0/10c", frame=True + grid=sliced_grid, cmap="SCM/vik", region="g", projection="W0/10c", frame=True ) return fig @@ -210,9 +210,9 @@ def test_grdimage_central_meridians(grid, proj_type, lon0): """ fig_ref, fig_test = Figure(), Figure() fig_ref.grdimage( - "@earth_relief_01d_g", projection=f"{proj_type}{lon0}/15c", cmap="geo" + "@earth_relief_01d_g", projection=f"{proj_type}{lon0}/15c", cmap="gmt/geo" ) - fig_test.grdimage(grid, projection=f"{proj_type}{lon0}/15c", cmap="geo") + fig_test.grdimage(grid, projection=f"{proj_type}{lon0}/15c", cmap="gmt/geo") return fig_ref, fig_test @@ -241,9 +241,11 @@ def test_grdimage_central_meridians_and_standard_parallels(grid, proj_type, lon0 """ fig_ref, fig_test = Figure(), Figure() fig_ref.grdimage( - "@earth_relief_01d_g", projection=f"{proj_type}{lon0}/{lat0}/15c", cmap="geo" + "@earth_relief_01d_g", + projection=f"{proj_type}{lon0}/{lat0}/15c", + cmap="gmt/geo", ) - fig_test.grdimage(grid, projection=f"{proj_type}{lon0}/{lat0}/15c", cmap="geo") + fig_test.grdimage(grid, projection=f"{proj_type}{lon0}/{lat0}/15c", cmap="gmt/geo") return fig_ref, fig_test diff --git a/pygmt/tests/test_grdview.py b/pygmt/tests/test_grdview.py index 021495b9de8..42424f9ded4 100644 --- a/pygmt/tests/test_grdview.py +++ b/pygmt/tests/test_grdview.py @@ -104,7 +104,7 @@ def test_grdview_with_cmap_for_image_plot(xrgrid): Run grdview by passing in a grid and setting a colormap for producing an image plot. """ fig = Figure() - fig.grdview(grid=xrgrid, cmap="oleron", surftype="i") + fig.grdview(grid=xrgrid, cmap="SCM/oleron", surftype="i") return fig @@ -115,7 +115,7 @@ def test_grdview_with_cmap_for_surface_monochrome_plot(xrgrid): monochrome plot. """ fig = Figure() - fig.grdview(grid=xrgrid, cmap="oleron", surftype="s+m") + fig.grdview(grid=xrgrid, cmap="SCM/oleron", surftype="s+m") return fig @@ -127,7 +127,11 @@ def test_grdview_with_cmap_for_perspective_surface_plot(xrgrid): """ fig = Figure() fig.grdview( - grid=xrgrid, cmap="oleron", surftype="s", perspective=[225, 30], zscale=0.005 + grid=xrgrid, + cmap="SCM/oleron", + surftype="s", + perspective=[225, 30], + zscale=0.005, ) return fig @@ -182,7 +186,7 @@ def test_grdview_surface_plot_styled_with_contourpen(xrgrid): """ fig = Figure() fig.grdview( - grid=xrgrid, cmap="relief", surftype="s", contour_pen="0.5p,black,dashed" + grid=xrgrid, cmap="geo/relief", surftype="s", contour_pen="0.5p,black,dashed" ) return fig @@ -194,7 +198,9 @@ def test_grdview_surface_mesh_plot_styled_with_meshpen(xrgrid): mesh plot. """ fig = Figure() - fig.grdview(grid=xrgrid, cmap="relief", surftype="sm", mesh_pen="0.5p,black,dashed") + fig.grdview( + grid=xrgrid, cmap="geo/relief", surftype="sm", mesh_pen="0.5p,black,dashed" + ) return fig @@ -243,7 +249,7 @@ def test_grdview_drapegrid_dataarray(xrgrid): fig = Figure() fig.grdview( - grid=xrgrid, drape_grid=drape_grid, cmap="oleron", surftype="c", frame=True + grid=xrgrid, drape_grid=drape_grid, cmap="SCM/oleron", surftype="c", frame=True ) return fig diff --git a/pygmt/tests/test_makecpt.py b/pygmt/tests/test_makecpt.py index 6b55c21b27c..5f9193e31e4 100644 --- a/pygmt/tests/test_makecpt.py +++ b/pygmt/tests/test_makecpt.py @@ -35,7 +35,7 @@ def test_makecpt_plot_points(points): Use static color palette table to change color of points. """ fig = Figure() - makecpt(cmap="rainbow") + makecpt(cmap="gmt/rainbow") fig.plot( x=points[:, 0], y=points[:, 1], @@ -53,7 +53,7 @@ def test_makecpt_plot_colorbar(position): Use static color palette table to plot a colorbar. """ fig = Figure() - makecpt(cmap="relief") + makecpt(cmap="gmt/relief") fig.colorbar(cmap=True, frame=True, position=position) return fig @@ -64,7 +64,7 @@ def test_makecpt_plot_colorbar_scaled_with_series(position): Use static color palette table scaled to a min/max series and plot it on a colorbar. """ fig = Figure() - makecpt(cmap="oleron", series=[0, 1000]) + makecpt(cmap="SCM/oleron", series=[0, 1000]) fig.colorbar(cmap=True, frame=True, position=position) return fig @@ -101,7 +101,7 @@ def test_makecpt_truncated_zlow_zhigh(position): Use static color palette table that is truncated to z-low and z-high. """ fig = Figure() - makecpt(cmap="rainbow", truncate=[0.15, 0.85], series=[0, 1000]) + makecpt(cmap="gmt/rainbow", truncate=[0.15, 0.85], series=[0, 1000]) fig.colorbar(cmap=True, frame=True, position=position) return fig @@ -112,7 +112,7 @@ def test_makecpt_reverse_color_only(position): Use static color palette table with its colors reversed. """ fig = Figure() - makecpt(cmap="earth", reverse=True, series=[0, 1000]) + makecpt(cmap="gmt/earth", reverse=True, series=[0, 1000]) fig.colorbar(cmap=True, frame=True, position=position) return fig @@ -123,7 +123,7 @@ def test_makecpt_reverse_color_and_zsign(position): Use static color palette table with both its colors and z-value sign reversed. """ fig = Figure() - makecpt(cmap="earth", reverse="cz", series=[0, 1000]) + makecpt(cmap="gmt/earth", reverse="cz", series=[0, 1000]) fig.colorbar(cmap=True, frame=True, position=position) return fig @@ -146,7 +146,7 @@ def test_makecpt_categorical(position): Use static color palette table that is categorical. """ fig = Figure() - makecpt(cmap="categorical", categorical=True, series=[0, 6, 1]) + makecpt(cmap="gmt/categorical", categorical=True, series=[0, 6, 1]) fig.colorbar(cmap=True, frame=True, position=position) return fig @@ -157,7 +157,7 @@ def test_makecpt_cyclic(position): Use static color palette table that is cyclic. """ fig = Figure() - makecpt(cmap="cork", cyclic=True) + makecpt(cmap="SCM/cork", cyclic=True) fig.colorbar(cmap=True, frame=True, position=position) return fig @@ -167,4 +167,4 @@ def test_makecpt_categorical_and_cyclic(): Use incorrect setting by setting both categorical and cyclic to True. """ with pytest.raises(GMTInvalidInput): - makecpt(cmap="batlow", categorical=True, cyclic=True) + makecpt(cmap="SCM/batlow", categorical=True, cyclic=True) diff --git a/pygmt/tests/test_plot.py b/pygmt/tests/test_plot.py index c38f195b958..460e2c61e0a 100644 --- a/pygmt/tests/test_plot.py +++ b/pygmt/tests/test_plot.py @@ -141,7 +141,7 @@ def test_plot_colors(data, region): region=region, projection="X10c", style="c0.5c", - cmap="cubhelix", + cmap="cpt-city/cubhelix", frame="af", ) return fig @@ -180,7 +180,7 @@ def test_plot_colors_sizes(data, region): region=region, projection="X10c", style="cc", - cmap="copper", + cmap="matlab/copper", frame="af", ) return fig @@ -199,7 +199,7 @@ def test_plot_colors_sizes_proj(data, region): fill=data[:, 2], size=0.5 * data[:, 2], style="cc", - cmap="copper", + cmap="matlab/copper", ) return fig @@ -293,7 +293,7 @@ def test_plot_sizes_colors_transparencies(): style="cc", fill=fill, size=size, - cmap="gray", + cmap="gmt/gray", transparency=transparency, ) return fig @@ -348,7 +348,7 @@ def test_plot_matrix_color(data): region=[10, 70, -5, 10], projection="X10c", style="c0.5c", - cmap="rainbow", + cmap="gmt/rainbow", frame="a", ) return fig diff --git a/pygmt/tests/test_plot3d.py b/pygmt/tests/test_plot3d.py index 69237e02447..f15f9101fad 100644 --- a/pygmt/tests/test_plot3d.py +++ b/pygmt/tests/test_plot3d.py @@ -140,7 +140,7 @@ def test_plot3d_colors(data, region): region=region, projection="X6c", style="c0.5c", - cmap="cubhelix", + cmap="cpt-city/cubhelix", frame=["afg", "zafg"], ) return fig @@ -189,7 +189,7 @@ def test_plot3d_colors_sizes(data, region): # Using inches instead of cm because of upstream bug at # https://github.com/GenericMappingTools/gmt/issues/4386 style="ui", - cmap="copper", + cmap="matlab/copper", frame=["af", "zaf"], ) return fig @@ -215,7 +215,7 @@ def test_plot3d_colors_sizes_proj(data, region): # Using inches instead of cm because of upstream bug at # https://github.com/GenericMappingTools/gmt/issues/4386 style="ui", - cmap="copper", + cmap="matlab/copper", ) return fig @@ -324,7 +324,7 @@ def test_plot3d_sizes_colors_transparencies(): style="uc", fill=fill, size=size, - cmap="gray", + cmap="gmt/gray", transparency=transparency, ) return fig @@ -387,7 +387,7 @@ def test_plot3d_matrix_color(data, region): region=region, projection="X10c", style="c0.5c", - cmap="rainbow", + cmap="gmt/rainbow", incols=[0, 1, 2, 2], frame=["a", "za"], ) diff --git a/pygmt/tests/test_rose.py b/pygmt/tests/test_rose.py index 9e68bc08d4f..32f6f558f5d 100644 --- a/pygmt/tests/test_rose.py +++ b/pygmt/tests/test_rose.py @@ -104,7 +104,7 @@ def test_rose_plot_data_using_cpt(data): region=[0, 1, 0, 360], sector=15, diameter="5.5c", - cmap="batlow", + cmap="SCM/batlow", frame=["x0.2g0.2", "y30g30", "+gdarkgray"], pen="1p", norm=True, diff --git a/pygmt/tests/test_subplot.py b/pygmt/tests/test_subplot.py index 62b015f188e..c7bfaa80b88 100644 --- a/pygmt/tests/test_subplot.py +++ b/pygmt/tests/test_subplot.py @@ -116,5 +116,5 @@ def test_subplot_outside_plotting_positioning(): with fig.subplot(nrows=1, ncols=2, figsize=(10, 5)): fig.basemap(region=[0, 10, 0, 10], projection="X?", panel=True) fig.basemap(region=[0, 10, 0, 10], projection="X?", panel=True) - fig.colorbar(position="JBC+w5c+h", cmap="turbo", frame=True) + fig.colorbar(position="JBC+w5c+h", cmap="google/turbo", frame=True) return fig