| | | |
Offset 279, 26 lines modified | Offset 279, 26 lines modified |
279 | </section> | 279 | </section> |
280 | <section·id="inspecting-the-cycler"> | 280 | <section·id="inspecting-the-cycler"> |
281 | <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="Link·to·this·heading">¶</a></h3> | 281 | <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="Link·to·this·heading">¶</a></h3> |
282 | <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 | 282 | <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 |
283 | 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> | 283 | 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> |
284 | <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> | 284 | <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> |
285 | <span·class="gh">Out[36]:·</span> | 285 | <span·class="gh">Out[36]:·</span> |
| 286 | <span·class="go">{'color':·['r',·'r',·'g',·'g',·'b',·'b'],</span> |
286 | <span·class="go">{'marker':·['s',·'o',·'s',·'o',·'s',·'o'],</span> | 287 | <span·class="go">·'marker':·['s',·'o',·'s',·'o',·'s',·'o']}</span> |
287 | <span·class="go">·'color':·['r',·'r',·'g',·'g',·'b',·'b']}</span> | |
288 | </pre></div> | 288 | </pre></div> |
289 | </div> | 289 | </div> |
290 | <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 | 290 | <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 |
291 | the·updated·values</p> | 291 | the·updated·values</p> |
292 | <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> | 292 | <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> |
| |
293 | <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> | 293 | <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> |
| |
294 | <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> | 294 | <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> |
295 | <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> | 295 | <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> |
296 | </pre></div> | 296 | </pre></div> |
297 | </div> | 297 | </div> |
298 | </section> | 298 | </section> |
299 | <section·id="examples"> | 299 | <section·id="examples"> |
300 | <h3>Examples<a·class="headerlink"·href="#examples"·title="Link·to·this·heading">¶</a></h3> | 300 | <h3>Examples<a·class="headerlink"·href="#examples"·title="Link·to·this·heading">¶</a></h3> |
301 | <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 | 301 | <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 |
302 | <code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">plot</span></code>·:</p> | 302 | <code·class="xref·py·py-obj·docutils·literal·notranslate"><span·class="pre">plot</span></code>·:</p> |