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

Skip to content

Commit 2e0c2bb

Browse files
committed
DOC: add markerstyles
1 parent 9f8bf7c commit 2e0c2bb

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tutorials/introductory/usage.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,19 @@ def my_plotter(ax, data1, data2, param_dict):
260260
# Marker size depends on the method being used. `~.Axes.plot` specifies
261261
# markersize in points, and is generally the "diameter" or width of the
262262
# marker. `~.Axes.scatter` specifies markersize as approximately
263-
# proportional to the visual area of the marker.
264-
#
263+
# proportional to the visual area of the marker. There are also an array of
264+
# markerstyles available as string codes (see :mod:`~.matplotlib.markers`) or
265+
# users can define their own `~.MarkerStyle` (see
266+
# :doc:`/gallery/lines_bars_markers/marker_reference`):
267+
268+
fig, ax = plt.subplots(figsize=(5, 2.7))
269+
ax.plot(data1, 'o', label='data1')
270+
ax.plot(data2, 'd', label='data2')
271+
ax.plot(data3, 'v', label='data3')
272+
ax.plot(data4, 's', label='data4')
273+
ax.legend()
274+
275+
################################################################################
265276
#
266277
# Labelling plots
267278
# ===============

0 commit comments

Comments
 (0)