8000 curly brackets dict · matplotlib/matplotlib@2e9a8c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e9a8c2

Browse files
committed
curly brackets dict
1 parent c3f5715 commit 2e9a8c2

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def _check_deps():
9292
'python': ('https://docs.python.org/', None),
9393
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
9494
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
95-
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None)
95+
'pandas': ('http://pandas.pydata.org/pandas-docs/stable', None)
9696
}
9797

9898

examples/misc/keyword_plotting.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
import matplotlib.pyplot as plt
1717
np.random.seed(19680801)
1818

19-
data = dict([('a', np.arange(50)),
20-
('c', np.random.randint(0, 50, 50)),
21-
('d', np.random.randn(50))])
19+
data = {'a': np.arange(50),
20+
'c': np.random.randint(0, 50, 50),
21+
'd': np.random.randn(50)}
2222
data['b'] = data['a'] + 10 * np.random.randn(50)
2323
data['d'] = np.abs(data['d']) * 100
2424

2525
fig, ax = plt.subplots()
2626
ax.scatter('a', 'b', c='c', s='d', data=data)
27-
ax.set(xlabel='a', ylabel='b')
27+
ax.set(xlabel='entry a', ylabel='entry b')
2828
plt.show()

tutorials/01_introductory/pyplot.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@
107107
# the ``data`` keyword argument. If provided, then you may generate plots with
108108
# the strings corresponding to these variables.
109109

110-
data = dict([('a', np.arange(50)),
111-
('c', np.random.randint(0, 50, 50)),
112-
('d', np.random.randn(50))])
110+
data = {'a': np.arange(50),
111+
'c': np.random.randint(0, 50, 50),
112+
'd': np.random.randn(50)}
113113
data['b'] = data['a'] + 10 * np.random.randn(50)
114114
data['d'] = np.abs(data['d']) * 100
115115

116-
plt.plot('a', 'b', color='c', data=data)
117-
plt.xlabel('a')
118-
plt.ylabel('b')
116+
plt.plot('a', 'b', color='c', s='d', data=data)
117+
plt.xlabel('entry a')
118+
plt.ylabel('entry b')
119119
plt.show()
120120

121121
###############################################################################

0 commit comments

Comments
 (0)
0