Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1882990

Browse files
committed
DOC: small fixes to gridded
1 parent deac85f commit 1882990

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

galleries/users_explain/plotting/gridded.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,12 @@ def midpoints_plus_ends(x):
172172
fig.colorbar(cf, ax=ax)
173173

174174
# %%
175-
# Note that like for `.Axes.pcolormesh`, the grid need not be orthogonal.
176-
# Here is the same data as above, but with the y grid points varying with x:
177-
#
178-
# The *levels* can be specified with a list of levels or a locator (see
179-
# :ref:`contourf_log` for an example of using a locator), and the colormap can
180-
# be set with the *cmap* argument (see :ref:`colormaps`).
175+
# Note that like for `.Axes.pcolormesh`, the grid need not be orthogonal. In
176+
# the following example the the same data is plotted as above, but with the y
177+
# grid points varying with x. The contour *levels* are also manually specified
178+
# in this example with a list of levels, (see :ref:`contourf_log` for an
179+
# example of using a tick locator instead of a list), and the colormap set with
180+
# the *cmap* argument (see :ref:`colormaps`).
181181

182182
Yn = Y + 0.3 * np.abs(x)
183183

@@ -198,10 +198,10 @@ def midpoints_plus_ends(x):
198198
# %%
199199
# barbs and quiver
200200
# ----------------
201-
# `~.axes.Axes.barbs` and `~.axes.Axes.quiver` allow us to represent vector
202-
# fields specified at points on an x-y grid by two-dimensional arrays U, V.
203-
# The arrays must be the same shape as x and y and the arrows are placed at the
204-
# corresponding points in the grid. The main difference between the two
201+
# `~.axes.Axes.barbs` and `~.axes.Axes.quiver` allow us to represent gridded
202+
# vector fields specified at points on an x-y grid by two-dimensional arrays U,
203+
# V. The arrays must be the same shape as x and y and the arrows are placed at
204+
# the corresponding points in the grid. The main difference between the two
205205
# functions is that `~.axes.Axes.barbs` plots barbs, which are a more
206206
# traditional representation of wind speed and direction, while
207207
# `~.axes.Axes.quiver` plots arrows with a uniform size and the direction is
@@ -249,16 +249,14 @@ def midpoints_plus_ends(x):
249249
ax.set_title('streamplot')
250250

251251
# %%
252-
# There are more examples of how to style the streamlines in the
253-
# :ref:`streamplot demo<plot_streamplot>`. Note that `~.axes.Axes.streamplot`
254-
# performs an interpolation and the streamlines are not guaranteed to be
255-
# accurate. For more accurate streamlines, the data grid could be refined.
252+
# `~.axes.Axes.streamplot` performs an interpolation and the streamlines are
253+
# not guaranteed to be accurate. For more accurate streamlines, the data grid
254+
# could be refined.
256255
#
257256
# .. note::
258257
#
259-
# Unlike `~.axes.Axes.barbs` and `~.axes.Axes.quiver`,
260-
# `~.axes.Axes.streamplot` does not accept 2D arrays for the x and y data.
261-
# The x and y data must be 1D arrays, and the spacing between the points must
258+
# `~.axes.Axes.streamplot` does not accept 2D arrays for the x and y data:
259+
# the x and y data must be 1D arrays, and the spacing between the points must
262260
# be uniform.
263261
#
264262
# .. seealso:: :ref:`Streamplot demo <plot_streamplot>`

0 commit comments

Comments
 (0)