8000 Add plotting method, return artist type table · chahak13/matplotlib@8fba320 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8fba320

Browse files
committed
Add plotting method, return artist type table
1 parent 5f4e555 commit 8fba320

File tree

1 file changed

+29
-23
lines changed

1 file changed

+29
-23
lines changed

tutorials/introductory/animation_tutorial.py

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -60,29 +60,35 @@
6060
# animation.
6161
#
6262
# The update function uses the `set_*` function for different artists to modify
63-
# the data.
64-
#
65-
# ============================= ===========================================
66-
# Artist Set method
67-
# ============================= ===========================================
68-
# `.lines.Line2D` `.lines.Line2D.set_data`
69-
# `.collections.PathCollection` `.collections.PathCollection.set_offsets`
70-
# `.image.AxesImage` `.image.AxesImage.set_data`
71-
# `.text.Annotation` `.text.Annotation.update_positions`
72-
# `.patches.Rectangle` `.Rectangle.set_angle`,
73-
# `.Rectangle.set_bounds`,
74-
# `.Rectangle.set_height`,
75-
# `.Rectangle.set_width`,
76-
# `.Rectangle.set_x`, `.Rectangle.set_y`
77-
# `.Rectangle.set_xy`
78-
# `.patches.Polygon` `.Polygon.set_xy`
79-
# `.patches.Ellipse` `.Ellipse.set_angle`,
80-
# `.Ellipse.set_center`,
81-
# `.Ellipse.set_height`, `.Ellipse.set_width`
82-
# ============================= ===========================================
83-
#
84-
# Other such set methods can be looked up in the artist documentation. An
85-
# example for animating a `.Axes.scatter` plot is
63+
# the data. The following table shows a few example methods, the artist types
64+
# they return and the methods that can be used to update them.
65+
#
66+
# ================= ============================= ===========================
67+
# Plotting method Artist Set method
68+
# ================= ============================= ===========================
69+
# `.Axes.plot` `.lines.Line2D` `.lines.Line2D.set_data`
70+
# `.Axes.scatter` `.collections.PathCollection` `.collections.PathCollecti\
71+
# on.set_offsets`
72+
# `.Axes.imshow` `.image.AxesImage` `.image.AxesImage.set_data`
73+
# `.Axes.annotate` `.text.Annotation` `.text.Annotation.update_p\
74+
# ositions`
75+
# `.Axes.barh` `.patches.Rectangle` `.Rectangle.set_angle`,
76+
# `.Rectangle.set_bounds`,
77+
# `.Rectangle.set_height`,
78+
# `.Rectangle.set_width`,
79+
# `.Rectangle.set_x`,
80+
# `.Rectangle.set_y`
81+
# `.Rectangle.set_xy`
82+
# `.Axes.fill` `.patches.Polygon` `.Polygon.set_xy`
83+
# `.patches.Circle` `.patches.Ellipse` `.Ellipse.set_angle`,
84+
# `.Ellipse.set_center`,
85+
# `.Ellipse.set_height`,
86+
# `.Ellipse.set_width`
87+
# ================= ============================= ===========================
88+
#
89+
# Covering the set methods for all types of artists is beyond the scope of this
90+
# tutorial but can be found in their respective documentations. An example of
91+
# such update methods in use for `.Axes.scatter` is as follows.
8692

8793

8894
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)
0