| | | |
Offset 282, 26 lines modified | Offset 282, 26 lines modified |
282 | </section> | 282 | </section> |
283 | <section·id="inspecting-the-cycler"> | 283 | <section·id="inspecting-the-cycler"> |
284 | <h3>Inspecting·the·<a·class="reference·internal"·href="generated/cycler.Cycler.html#cycler.Cycler"·title="cycler.Cycler"><code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">Cycler</span></code></a><a·class="headerlink"·href="#inspecting-the-cycler"·title="Permalink·to·this·heading">¶</a></h3> | 284 | <h3>Inspecting·the·<a·class="reference·internal"·href="generated/cycler.Cycler.html#cycler.Cycler"·title="cycler.Cycler"><code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">Cycler</span></code></a><a·class="headerlink"·href="#inspecting-the-cycler"·title="Permalink·to·this·heading">¶</a></h3> |
285 | <p>To·inspect·the·values·of·the·transposed·<a·class="reference·internal"·href="generated/cycler.Cycler.html#cycler.Cycler"·title="cycler.Cycler"><code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">Cycler</span></code></a>·use | 285 | <p>To·inspect·the·values·of·the·transposed·<a·class="reference·internal"·href="generated/cycler.Cycler.html#cycler.Cycler"·title="cycler.Cycler"><code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">Cycler</span></code></a>·use |
286 | the·<a·class="reference·internal"·href="generated/cycler.Cycler.html#cycler.Cycler.by_key"·title="cycler.Cycler.by_key"><code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">Cycler.by_key</span></code></a>·method:</p> | 286 | the·<a·class="reference·internal"·href="generated/cycler.Cycler.html#cycler.Cycler.by_key"·title="cycler.Cycler.by_key"><code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">Cycler.by_key</span></code></a>·method:</p> |
287 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[36]:·</span><span·class="n">c_m</span><span·class="o">.</span><span·class="n">by_key</span><span·class="p">()</span> | 287 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[36]:·</span><span·class="n">c_m</span><span·class="o">.</span><span·class="n">by_key</span><span·class="p">()</span> |
288 | <span·class="gh">Out[36]:·</span> | 288 | <span·class="gh">Out[36]:·</span> |
289 | <span·class="go">{'color':·['r',·'r',·'g',·'g',·'b',·'b'],</span> | |
290 | <span·class="go">·'marker':·['s',·'o',·'s',·'o',·'s',·'o']}</span> | 289 | <span·class="go">{'marker':·['s',·'o',·'s',·'o',·'s',·'o'],</span> |
| 290 | <span·class="go">·'color':·['r',·'r',·'g',·'g',·'b',·'b']}</span> |
291 | </pre></div> | 291 | </pre></div> |
292 | </div> | 292 | </div> |
293 | <p>This·<code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">dict</span></code>·can·be·mutated·and·used·to·create·a·new·<a·class="reference·internal"·href="generated/cycler.Cycler.html#cycler.Cycler"·title="cycler.Cycler"><code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">Cycler</span></code></a>·with | 293 | <p>This·<code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">dict</span></code>·can·be·mutated·and·used·to·create·a·new·<a·class="reference·internal"·href="generated/cycler.Cycler.html#cycler.Cycler"·title="cycler.Cycler"><code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">Cycler</span></code></a>·with |
294 | the·updated·values</p> | 294 | the·updated·values</p> |
295 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[37]:·</span><span·class="n">bk</span>·<span·class="o">=</span>·<span·class="n">c_m</span><span·class="o">.</span><span·class="n">by_key</span><span·class="p">()</span> | 295 | <div·class="highlight-ipython·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">In·[37]:·</span><span·class="n">bk</span>·<span·class="o">=</span>·<span·class="n">c_m</span><span·class="o">.</span><span·class="n">by_key</span><span·class="p">()</span> |
| |
296 | <span·class="gp">In·[38]:·</span><span·class="n">bk</span><span·class="p">[</span><span·class="s1">'color'</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="p">[</span><span·class="s1">'green'</span><span·class="p">]</span>·<span·class="o">*</span>·<span·class="nb">len</span><span·class="p">(</span><span·class="n">c_m</span><span·class="p">)</span> | 296 | <span·class="gp">In·[38]:·</span><span·class="n">bk</span><span·class="p">[</span><span·class="s1">'color'</span><span·class="p">]</span>·<span·class="o">=</span>·<span·class="p">[</span><span·class="s1">'green'</span><span·class="p">]</span>·<span·class="o">*</span>·<span·class="nb">len</span><span·class="p">(</span><span·class="n">c_m</span><span·class="p">)</span> |
| |
297 | <span·class="gp">In·[39]:·</span><span·class="n">cycler</span><span·class="p">(</span><span·class="o">**</span><span·class="n">bk</span><span·class="p">)</span> | 297 | <span·class="gp">In·[39]:·</span><span·class="n">cycler</span><span·class="p">(</span><span·class="o">**</span><span·class="n">bk</span><span·class="p">)</span> |
298 | <span·class="gh">Out[39]:·</span><span·class="go">(cycler('color',·['green',·'green',·'green',·'green',·'green',·'green'])·+·cycler('marker',·['s',·'o',·'s',·'o',·'s',·'o']))</span> | 298 | <span·class="gh">Out[39]:·</span><span·class="go">(cycler('marker',·['s',·'o',·'s',·'o',·'s',·'o'])·+·cycler('color',·['green',·'green',·'green',·'green',·'green',·'green']))</span> |
299 | </pre></div> | 299 | </pre></div> |
300 | </div> | 300 | </div> |
301 | </section> | 301 | </section> |
302 | <section·id="examples"> | 302 | <section·id="examples"> |
303 | <h3>Examples<a·class="headerlink"·href="#examples"·title="Permalink·to·this·heading">¶</a></h3> | 303 | <h3>Examples<a·class="headerlink"·href="#examples"·title="Permalink·to·this·heading">¶</a></h3> |
304 | <p>We·can·use·<a·class="reference·internal"·href="generated/cycler.Cycler.html#cycler.Cycler"·title="cycler.Cycler"><code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">Cycler</span></code></a>·instances·to·cycle·over·one·or·more·<code·class="docutils·literal·notranslate"><span·class="pre">kwarg</span></code>·to | 304 | <p>We·can·use·<a·class="reference·internal"·href="generated/cycler.Cycler.html#cycler.Cycler"·title="cycler.Cycler"><code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">Cycler</span></code></a>·instances·to·cycle·over·one·or·more·<code·class="docutils·literal·notranslate"><span·class="pre">kwarg</span></code>·to |
305 | <code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">plot</span></code>·:</p> | 305 | <code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">plot</span></code>·:</p> |