Skip to content

Commit bd99dfb

Browse files
authored
Merge pull request matplotlib#13391 from dstansby/ex-remove-colours
Remove colour specification from some examples
2 parents c29f81e + cfe1f40 commit bd99dfb

File tree

20 files changed

+52
-53
lines changed

20 files changed

+52
-53
lines changed

examples/event_handling/legend_picking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
fig, ax = plt.subplots()
1616
ax.set_title('Click on legend line to toggle line on/off')
17-
line1, = ax.plot(t, y1, lw=2, color='red', label='1 HZ')
18-
line2, = ax.plot(t, y2, lw=2, color='blue', label='2 HZ')
17+
line1, = ax.plot(t, y1, lw=2, label='1 HZ')
18+
line2, = ax.plot(t, y2, lw=2, label='2 HZ')
1919
leg = ax.legend(loc='upper left', fancybox=True, shadow=True)
2020
leg.get_frame().set_alpha(0.4)
2121

examples/misc/bbox_intersect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919

2020
left, bottom, width, height = (-1, -1, 2, 2)
21-
rect = plt.Rectangle((left, bottom), width, height, facecolor="#aaaaaa")
21+
rect = plt.Rectangle((left, bottom), width, height,
22+
facecolor="black", alpha=0.1)
2223

2324
fig, ax = plt.subplots()
2425
ax.add_patch(rect)

examples/misc/demo_ribbon_box.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
===============
3-
Demo Ribbon Box
4-
===============
2+
==========
3+
Ribbon Box
4+
==========
55
66
"""
77

examples/mplot3d/hist3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
dx = dy = 0.5 * np.ones_like(zpos)
3232
dz = hist.ravel()
3333

34-
ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color='b', zsort='average')
34+
ax.bar3d(xpos, ypos, zpos, dx, dy, dz, zsort='average')
3535

3636
plt.show()

examples/mplot3d/scatter3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ def randrange(n, vmin, vmax):
3030

3131
# For each set of style and range settings, plot n random points in the box
3232
# defined by x in [23, 32], y in [0, 100], z in [zlow, zhigh].
33-
for c, m, zlow, zhigh in [('r', 'o', -50, -25), ('b', '^', -30, -5)]:
33+
for m, zlow, zhigh in [('o', -50, -25), ('^', -30, -5)]:
3434
xs = randrange(n, 23, 32)
3535
ys = randrange(n, 0, 100)
3636
zs = randrange(n, zlow, zhigh)
37-
ax.scatter(xs, ys, zs, c=c, marker=m)
37+
ax.scatter(xs, ys, zs, marker=m)
3838

3939
ax.set_xlabel('X Label')
4040
ax.set_ylabel('Y Label')

examples/mplot3d/surface3d_2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
z = 10 * np.outer(np.ones(np.size(u)), np.cos(v))
2525

2626
# Plot the surface
27-
ax.plot_surface(x, y, z, color='b')
27+
ax.plot_surface(x, y, z)
2828

2929
plt.show()

examples/pyplots/fig_axes_labels_simple.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
======================
3-
Fig Axes Labels Simple
4-
======================
2+
==================
3+
Simple axes labels
4+
==================
55
66
Label the axes of a plot.
77
"""
@@ -15,15 +15,14 @@
1515
ax1.set_title('a sine wave')
1616

1717
t = np.arange(0.0, 1.0, 0.01)
18-
s = np.sin(2*np.pi*t)
19-
line, = ax1.plot(t, s, color='blue', lw=2)
18+
s = np.sin(2 * np.pi * t)
19+
line, = ax1.plot(t, s, lw=2)
2020

2121
# Fixing random state for reproducibility
2222
np.random.seed(19680801)
2323

2424
ax2 = fig.add_axes([0.15, 0.1, 0.7, 0.3])
25-
n, bins, patches = ax2.hist(np.random.randn(1000), 50,
26-
facecolor='yellow', edgecolor='yellow')
25+
n, bins, patches = ax2.hist(np.random.randn(1000), 50)
2726
ax2.set_xlabel('time (s)')
2827

2928
plt.show()

examples/pyplots/fig_x.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
"""
2-
=====
3-
Fig X
4-
=====
2+
=======================
3+
Adding lines to figures
4+
=======================
55
6-
Add lines to a figure (without axes).
6+
Adding lines to a figure without any axes.
77
"""
88
import matplotlib.pyplot as plt
99
import matplotlib.lines as lines
1010

1111

1212
fig = plt.figure()
13-
1413
l1 = lines.Line2D([0, 1], [0, 1], transform=fig.transFigure, figure=fig)
15-
1614
l2 = lines.Line2D([0, 1], [1, 0], transform=fig.transFigure, figure=fig)
17-
1815
fig.lines.extend([l1, l2])
1916

2017
plt.show()

examples/pyplots/whats_new_1_subplot3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
X, Y = np.meshgrid(X, Y)
2222
R = np.sqrt(X**2 + Y**2)
2323
Z = np.sin(R)
24-
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet,
25-
linewidth=0, antialiased=False)
24+
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.viridis,
25+
linewidth=0, antialiased=False)
2626
ax.set_zlim3d(-1.01, 1.01)
2727

2828
#ax.w_zaxis.set_major_locator(LinearLocator(10))

examples/shapes_and_collections/artist_reference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
22
================================
3-
Reference for matplotlib artists
3+
Reference for Matplotlib artists
44
================================
55
6-
This example displays several of matplotlib's graphics primitives (artists)
6+
This example displays several of Matplotlib's graphics primitives (artists)
77
drawn using matplotlib API. A full list of artists and the documentation is
88
available at :ref:`the artist API <artist-api>`.
99

0 commit comments

Comments
 (0)