Skip to content

Commit a870dfd

Browse files
Gallery example "vector styles": Fix typos (#3439)
1 parent 2bb65df commit a870dfd

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

examples/gallery/lines/vector_styles.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
Cartesian, circular, and geographic vectors
33
===========================================
44
5-
The :meth:`pygmt.Figure.plot` method can plot Cartesian, circular, and
6-
geographic vectors. The ``style`` parameter controls vector attributes.
7-
See also the :doc:`Vector attributes example </gallery/lines/vector_heads_tails>`.
5+
The :meth:`pygmt.Figure.plot` method can plot Cartesian, circular, and geographic
6+
vectors. The ``style`` parameter controls vector attributes. See also the
7+
:doc:`Vector attributes example </gallery/lines/vector_heads_tails>`.
88
"""
99

1010
# %%
1111
import numpy as np
1212
import pygmt
1313

14-
# create a plot with coast, Mercator projection (M) over the continental US
14+
# Create a plot with coast, Mercator projection (M) over the continental US
1515
fig = pygmt.Figure()
1616
fig.coast(
1717
region=[-127, -64, 24, 53],
@@ -28,8 +28,8 @@
2828
y = np.linspace(33.5, 42.5, 12) # y vector coordinates
2929
direction = np.zeros(x.shape) # direction of vectors
3030
length = np.linspace(0.5, 2.4, 12) # length of vectors
31-
# Cartesian vectors (v) with red fill and pen (+g, +p), vector head at
32-
# end (+e), and 40 degree angle (+a) with no indentation for vector head (+h)
31+
# Cartesian vectors (v) with red fill and pen (+g, +p), vector head at the end (+e), and
32+
# 40 degree angle (+a) with no indentation for the vector head (+h)
3333
style = "v0.2c+e+a40+gred+h0+p1p,red"
3434
fig.plot(x=x, y=y, style=style, pen="1p,red", direction=[direction, length])
3535
fig.text(text="CARTESIAN", x=-112, y=44.2, font="13p,Helvetica-Bold,red", fill="white")
@@ -44,7 +44,7 @@
4444
stopdir = 180 + 40 * np.arange(0, num) # stop direction in degrees
4545
# data for circular vectors
4646
data = np.column_stack([x, y, radius, startdir, stopdir])
47-
arcstyle = "m0.5c+ea" # Circular vector (m) with an arrow at end
47+
arcstyle = "m0.5c+ea" # Circular vector (m) with an arrow at the end
4848
fig.plot(data=data, style=arcstyle, fill="red3", pen="1.5p,black")
4949
fig.text(text="CIRCULAR", x=-95, y=44.2, font="13p,Helvetica-Bold,black", fill="white")
5050

@@ -54,9 +54,8 @@
5454
CHI = [-87.6298, 41.8781]
5555
SEA = [-122.3321, 47.6062]
5656
NO = [-90.0715, 29.9511]
57-
# `=` means geographic vectors.
58-
# With the modifier '+s', the input data should contain coordinates of start
59-
# and end points
57+
# '=' means geographic vectors. With the modifier '+s', the input data should contain
58+
# coordinates of start and end points
6059
style = "=0.5c+s+e+a30+gblue+h0.5+p1p,blue"
6160
data = np.array([NYC + CHI, NYC + SEA, NYC + NO])
6261
fig.plot(data=data, style=style, pen="1.0p,blue")

0 commit comments

Comments
 (0)