Skip to content

Commit 19c1e1f

Browse files
committed
Update examples
1 parent 05ad039 commit 19c1e1f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/tutorials/advanced/cartesian_histograms.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# Import the required packages
1919
import numpy as np
2020
import pygmt
21+
from pygmt.params import Pattern
2122

2223
# %%
2324
# Generate random data from a normal distribution:
@@ -204,10 +205,8 @@
204205
frame=["wSnE", "xaf10", "ya5f1+lCumulative counts"],
205206
data=data01,
206207
series=10,
207-
# Use pattern ("p") number 8 as fill for the bars
208-
# Set the background ("+b") to white [Default]
209-
# Set the foreground ("+f") to black [Default]
210-
fill="p8+bwhite+fblack",
208+
# Fill bars with GMT pattern 8, with white background and black foreground.
209+
fill=Pattern(8, bgcolor="white", fgcolor="black"),
211210
pen="1p,darkgray,solid",
212211
histtype=0,
213212
# Show cumulative counts

examples/tutorials/advanced/focal_mechanisms.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# %%
1919
import pandas as pd
2020
import pygmt
21+
from pygmt.params import Pattern
2122

2223
# Set up arguments for basemap
2324
region = [-5, 5, -5, 5]
@@ -122,8 +123,8 @@
122123
longitude=2,
123124
latitude=0,
124125
depth=0,
125-
compressionfill="p8",
126-
extensionfill="p31",
126+
compressionfill=Pattern(8),
127+
extensionfill=Pattern(31),
127128
outline=True,
128129
)
129130

0 commit comments

Comments
 (0)