Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b424478

Browse filesBrowse files
committed
Merge pull request #7821 from vollbier/remove_showcase_piechart
DOC: Changes to screenshots plots.
1 parent 2f3041e commit b424478
Copy full SHA for b424478

File tree

Expand file treeCollapse file tree

3 files changed

+4
-28
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-28
lines changed

‎examples/pie_and_polar_charts/pie_demo_features.py

Copy file name to clipboardExpand all lines: examples/pie_and_polar_charts/pie_demo_features.py
+1-25Lines 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

Copy file name to clipboardExpand all lines: examples/pylab_examples/scatter_demo2.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
fig, ax = plt.subplots()
3030
ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.5)
3131

32-
ax.set_xlabel(r'$\Delta_i$', fontsize=20)
33-
ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=20)
32+
ax.set_xlabel(r'$\Delta_i$', fontsize=15)
33+
ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=15)
3434
ax.set_title('Volume and percent change')
3535

3636
ax.grid(True)

‎examples/pylab_examples/simple_plot.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/simple_plot.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.