Skip to content

Commit 375dab3

Browse files
committed
Move makecpt in line-custom-cpt.py
1 parent fb998c5 commit 375dab3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/gallery/line/line-custom-cpt.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
import numpy as np
1515
import pygmt
1616

17-
# Create a custom CPT with the batlow CPT and 10 discrete z-values (colors)
18-
pygmt.makecpt(cmap="batlow", series=[0, 10, 1])
1917
# Create a list of values between 20 and 30 with at 0.2 intervals
2018
x = np.arange(start=20, stop=30, step=0.2)
2119

2220
fig = pygmt.Figure()
2321
fig.basemap(frame=["WSne", "af"], region=[20, 30, -10, 10])
2422

23+
# Create a custom CPT with the batlow CPT and 10 discrete z-values (colors)
24+
pygmt.makecpt(cmap="batlow", series=[0, 10, 1])
25+
2526
# Plot 10 lines and set a different z-value for each line
2627
for zvalue in range(0, 10):
2728
y = zvalue * np.sin(x)

0 commit comments

Comments
 (0)