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

Skip to content

Commit e0a3da8

Browse files
authored
Merge pull request #7821 from vollbier/remove_showcase_piechart
DOC: Changes to screenshots plots.
2 parents 9187e3f + 8f3e013 commit e0a3da8

File tree

3 files changed

+4
-28
lines changed

3 files changed

+4
-28
lines changed

examples/pie_and_polar_charts/pie_demo_features.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,16 @@
1616
rotated counter-clockwise by 90 degrees, and the frog slice starts on the
1717
positive y-axis.
1818
"""
19-
import numpy as np
2019
import matplotlib.pyplot as plt
2120

2221
# Pie chart, where the slices will be ordered and plotted counter-clockwise:
2322
labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
2423
sizes = [15, 30, 45, 10]
2524
explode = (0, 0.1, 0, 0) # only "explode" the 2nd slice (i.e. 'Hogs')
2625

27-
fg1, ax1 = plt.subplots()
26+
fig1, ax1 = plt.subplots()
2827
ax1.pie(sizes, explode=explode, labels=labels, autopct='%1.1f%%',
2928
shadow=True, startangle=90)
3029
ax1.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle.
3130

32-
33-
# Plot four Pie charts in a 2x2 grid:
34-
pie_data = [np.roll(sizes, i) for i in range(4)] # generate some data
35-
pie_centerpos = [(0, 0), (0, 1), (1, 0), (1, 1)] # the grid positions
36-
37-
fg2, ax2 = plt.subplots()
38-
for data, cpos in zip(pie_data, pie_centerpos):
39-
_, txts = ax2.pie(data, explode=explode, shadow=True, startangle=90,
40-
radius=0.35, center=cpos, frame=True, labeldistance=.7)
41-
# Make texts include number and labels:
42-
for t, l, d in zip(txts, labels, data):
43-
t.set_text("%s\n %.1f%%" % (l, d))
44-
t.set_horizontalalignment("center")
45-
t.set_fontsize(8)
46-
47-
ax2.set_xticks([0, 1])
48-
ax2.set_yticks([0, 1])
49-
ax2.set_xticklabels(["Sunny", "Cloudy"])
50-
ax2.set_yticklabels(["Dry", "Rainy"])
51-
ax2.set_xlim((-0.5, 1.5))
52-
ax2.set_ylim((-0.5, 1.5))
53-
ax2.set_aspect('equal') # Equal aspect ratio ensures that the pie is a circle.
54-
5531
plt.show()

examples/pylab_examples/scatter_demo2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
fig, ax = plt.subplots()
2222
ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.5)
2323

24-
ax.set_xlabel(r'$\Delta_i$', fontsize=20)
25-
ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=20)
24+
ax.set_xlabel(r'$\Delta_i$', fontsize=15)
25+
ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=15)
2626
ax.set_title('Volume and percent change')
2727

2828
ax.grid(True)

examples/pylab_examples/simple_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import numpy as np
33

44
t = np.arange(0.0, 2.0, 0.01)
5-
s = np.sin(2*np.pi*t)
5+
s = 1 + np.sin(2*np.pi*t)
66
plt.plot(t, s)
77

88
plt.xlabel('time (s)')

0 commit comments

Comments
 (0)