Skip to content

Commit e792e9d

Browse files
Intros / Tutorials / Gallery: Include folder in colormap name (#4311)
1 parent 34e49a4 commit e792e9d

56 files changed

Lines changed: 140 additions & 128 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ def test_my_plotting_case():
689689
Test that my plotting method works.
690690
"""
691691
fig_ref, fig_test = Figure(), Figure()
692-
fig_ref.grdimage("@earth_relief_01d_g", projection="W120/15c", cmap="geo")
693-
fig_test.grdimage(grid, projection="W120/15c", cmap="geo")
692+
fig_ref.grdimage("@earth_relief_01d_g", projection="W120/15c", cmap="gmt/geo")
693+
fig_test.grdimage(grid, projection="W120/15c", cmap="gmt/geo")
694694
return fig_ref, fig_test
695695
```

doc/techref/justification_codes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Script showing justification codes for plot embellishments, e.g., a colorbar.
105105
fig = pygmt.Figure()
106106
fig.basemap(projection="X10c/2c", region=[-size, size, -size, size], frame=0)
107107
108-
fig.colorbar(cmap="buda", frame=0, position="jMC+w10c/2c+h")
108+
fig.colorbar(cmap="SCM/buda", frame=0, position="jMC+w10c/2c+h")
109109
110110
for code in codes:
111111
fig.text(

examples/gallery/3d_plots/grdview_surface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def ackley(x, y):
5252
projection=f"x{SCALE}c",
5353
zscale=f"{SCALE}c",
5454
surftype="s",
55-
cmap="roma",
55+
cmap="SCM/roma",
5656
perspective=[135, 30], # Azimuth southeast (135°), at elevation 30°
5757
shading="+a45",
5858
)

examples/gallery/3d_plots/scatter3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
# palette "cubhelix" in categorical format and add the species names as
5555
# annotations for the colorbar
5656
pygmt.makecpt(
57-
cmap="cubhelix",
57+
cmap="cpt-city/cubhelix",
5858
# Use the minimum and maximum of the categorical number code
5959
# to set the lowest_value and the highest_value of the CPT
6060
series=(df.species.cat.codes.min(), df.species.cat.codes.max(), 1),

examples/gallery/basemaps/ternary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
# Define a colormap to be used for the values given in the fourth column
2424
# of the input dataset
25-
pygmt.makecpt(cmap="batlow", series=[0, 80, 10])
25+
pygmt.makecpt(cmap="SCM/batlow", series=[0, 80, 10])
2626

2727
fig.ternary(
2828
data,

examples/gallery/embellishments/colorbar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
# Colorbar is placed at Bottom Center (BC) by default if no position is given
3636
# Add quantity and unit as labels ("+l") to the x and y axes
3737
# Add annotations ("+a") in steps of 0.5 and ticks ("+f") in steps of 0.1
38-
fig.colorbar(cmap="roma", frame=["xa0.5f0.1+lVelocity", "y+lm/s"])
38+
fig.colorbar(cmap="SCM/roma", frame=["xa0.5f0.1+lVelocity", "y+lm/s"])
3939

4040
# ============
4141
# Create a colorbar showing the scientific rainbow - batlow
4242
fig.colorbar(
43-
cmap="batlow",
43+
cmap="SCM/batlow",
4444
# Colorbar positioned at map coordinates (g) longitude/latitude 0.3/8.7,
4545
# with a length/width (+w) of 4 cm by 0.5 cm, and plotted horizontally (+h)
4646
position="g0.3/8.7+w4c/0.5c+h",
@@ -52,7 +52,7 @@
5252
# ============
5353
# Create a colorbar suitable for surface topography - oleron
5454
fig.colorbar(
55-
cmap="oleron",
55+
cmap="SCM/oleron",
5656
# Colorbar placed outside the plot bounding box (J) at Middle Right (MR),
5757
# offset (+o) by 1 cm horizontally and 0 cm vertically from anchor point,
5858
# with a length/width (+w) of 7 cm by 0.5 cm and a box for NaN values (+n)
@@ -68,7 +68,7 @@
6868
# Create a colorbar suitable for categorical data - hawaii
6969
# Set up the colormap
7070
pygmt.makecpt(
71-
cmap="hawaii",
71+
cmap="SCM/hawaii",
7272
series=[0, 3, 1],
7373
# Comma-separated string for the annotations of the colorbar
7474
color_model="+cA,B,C,D",

examples/gallery/embellishments/colorbars_multiple.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
# Activate the first panel so that the colormap created by the makecpt
2929
# function is a panel-level CPT
3030
with fig.set_panel(panel=0):
31-
pygmt.makecpt(cmap="geo", series=[-8000, 8000])
31+
pygmt.makecpt(cmap="gmt/geo", series=[-8000, 8000])
3232
# "R?" means Winkel Tripel projection with map width automatically
3333
# determined from the subplot width.
3434
fig.grdimage(grid=grid_globe, projection="R?", region="g", frame="a")
3535
fig.colorbar(frame=["a4000f2000", "x+lElevation", "y+lm"])
3636
# Activate the second panel so that the colormap created by the makecpt
3737
# function is a panel-level CPT
3838
with fig.set_panel(panel=1):
39-
pygmt.makecpt(cmap="globe", series=[-6000, 3000])
39+
pygmt.makecpt(cmap="gmt/globe", series=[-6000, 3000])
4040
# "M?" means Mercator projection with map width also automatically
4141
# determined from the subplot width.
4242
fig.grdimage(grid=grid_subset, projection="M?", region=subset_region, frame="a")

examples/gallery/histograms/blockm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
grid=grd,
3434
region=region,
3535
frame=["af", "+tMean earthquake depth inside each block"],
36-
cmap="batlow",
36+
cmap="SCM/batlow",
3737
)
3838
# Plot slightly transparent landmasses on top
3939
fig.coast(land="darkgray", transparency=40)
@@ -52,7 +52,7 @@
5252
grid=grd,
5353
region=region,
5454
frame=["af", "+tNumber of points inside each block"],
55-
cmap="batlow",
55+
cmap="SCM/batlow",
5656
)
5757
fig.coast(land="darkgray", transparency=40)
5858
fig.plot(x=data.longitude, y=data.latitude, style="c0.3c", fill="white", pen="1p,black")

examples/gallery/images/cross_section.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
grid_map = pygmt.datasets.load_earth_relief(resolution="10m", region=region_map)
3838

3939
# Plot the downloaded grid with color-coding based on the elevation
40-
fig.grdimage(grid=grid_map, cmap="oleron")
40+
fig.grdimage(grid=grid_map, cmap="SCM/oleron")
4141

4242
# Add a colorbar for the elevation
4343
fig.colorbar(

examples/gallery/images/grdclip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
projection="M12c",
2626
frame=["WSne+toriginal grid", "xa5f1", "ya2f1"],
2727
)
28-
fig.grdimage(grid=grid, cmap="oleron")
28+
fig.grdimage(grid=grid, cmap="SCM/oleron")
2929

3030
# Shift plot origin of the second map by "width of the first map + 0.5 cm"
3131
# in x-direction

0 commit comments

Comments
 (0)