Skip to content

Commit 807ec19

Browse files
committed
DOC: yet more doc edit
1 parent a2322e6 commit 807ec19

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

doc/source/index.rst

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
.. currentmodule:: cycler
22

3-
==========================
4-
Style/kwarg cycler Guide
5-
==========================
3+
====================
4+
Style/kwarg cycler
5+
====================
66

77
.. htmlonly::
88

99
:Release: |version|
1010
:Date: |today|
1111

1212
:py:mod:`cycler` API
13-
===============================
13+
====================
1414

1515
.. autosummary::
1616
:toctree: generated/
@@ -107,8 +107,11 @@ As with arithmetic, addition is commutative
107107

108108
.. ipython:: python
109109
110-
for a, b in zip(lw_cycle + color_cycle, color_cycle + lw_cycle):
111-
print(a == b)
110+
lw_c = lw_cycle + color_cycle
111+
c_lw = color_cycle + lw_cycle
112+
113+
for j, (a, b) in enumerate(zip(lw_c, c_lw)):
114+
print('({j}) A: {A!r} B: {B!r}'.format(j=j, A=a, B=b))
112115
113116
114117
Multiplication
@@ -138,8 +141,9 @@ matrices)
138141
.. ipython:: python
139142
140143
c_m = color_cycle * m_cycle
141-
for a, b in zip(c_m, m_c):
142-
print(a, b)
144+
145+
for j, (a, b) in enumerate(zip(c_m, m_c)):
146+
print('({j}) A: {A!r} B: {B!r}'.format(j=j, A=a, B=b))
143147
144148
145149
@@ -159,7 +163,7 @@ Integer Multiplication
159163
Slicing
160164
-------
161165

162-
Cycles can be sliced with :obj:`silce` objects
166+
Cycles can be sliced with :obj:`slice` objects
163167

164168
.. ipython:: python
165169
@@ -179,7 +183,8 @@ Examples
179183
from cycler import cycler
180184
from itertools import cycle
181185

182-
fig, (ax1, ax2) = plt.subplots(1, 2, tight_layout=True, figsize=(8, 4))
186+
fig, (ax1, ax2) = plt.subplots(1, 2, tight_layout=True,
187+
figsize=(8, 4))
183188
x = np.arange(10)
184189

185190
color_cycle = cycler('c', ['r', 'g', 'b'])
@@ -198,7 +203,8 @@ Examples
198203
from cycler import cycler
199204
from itertools import cycle
200205

201-
fig, (ax1, ax2) = plt.subplots(1, 2, tight_layout=True, figsize=(8, 4))
206+
fig, (ax1, ax2) = plt.subplots(1, 2, tight_layout=True,
207+
figsize=(8, 4))
202208
x = np.arange(10)
203209

204210
color_cycle = cycler('c', ['r', 'g', 'b'])
@@ -225,15 +231,16 @@ A :obj:`ValueError` is raised if unequal length `Cycler` s are added together
225231
.. ipython:: python
226232
:okexcept:
227233
228-
color_cycle + ls_cycle
234+
cycler('c', ['r', 'g', 'b']) + cycler('ls', ['-', '--'])
229235
230236
or if two cycles which have overlapping keys are composed
231237

232238
.. ipython:: python
233239
:okexcept:
234240
241+
color_cycle = cycler('c', ['r', 'g', 'b'])
242+
235243
color_cycle + color_cycle
236-
color_cycle * color_cycle
237244
238245
239246
Motivation

0 commit comments

Comments
 (0)