Cleanup a few examples. by anntzer · Pull Request #24705 · matplotlib/matplotlib · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/misc/demo_ribbon_box.py
7 changes: 3 additions & 4 deletions examples/shapes_and_collections/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
The third subplot will make regular polygons, with the same
type of scaling and positioning as in the first two.

The last subplot illustrates the use of "offsets=(xo, yo)",
The last subplot illustrates the use of ``offsets=(xo, yo)``,
that is, a single tuple instead of a list of tuples, to generate
successively offset curves, with the offset given in data
units. This behavior is available only for the LineCollection.
"""

import matplotlib.pyplot as plt
from matplotlib import collections, colors, transforms
from matplotlib import collections, transforms
import numpy as np

nverts = 50
Expand All @@ -38,8 +38,7 @@
xyo = rs.randn(npts, 2)

# Make a list of colors cycling through the default series.
colors = [colors.to_rgba(c)
for c in plt.rcParams['axes.prop_cycle'].by_key()['color']]
colors = plt.rcParams['axes.prop_cycle'].by_key()['color']

fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2)
fig.subplots_adjust(top=0.92, left=0.07, right=0.97,
Expand Down
43 changes: 13 additions & 30 deletions examples/shapes_and_collections/line_collection.py