<p dir="auto">Debian GNU/Linux 6.0.10 (squeeze) and OSX 10.11.4, Python 3.5.1, matplotlib 1.5.1 (anaconda 4.0.5)</p>
<p dir="auto">Setting the prop_cycle for an axis breaks the usage of keyword aliases in the plot function. In the following snippets the keyword <code class="notranslate">lw=0.1</code> is ignored, but <code class="notranslate">linewidth=0.1</code> produces the wanted result.</p>
<p dir="auto">Maybe it is worth mentioning that <code class="notranslate">color</code> is still accessible via its alias <code class="notranslate">c</code> after setting a prop_cycle.</p>
<p dir="auto">If it seems weird to set the prop_cycle to just ignore it: I stumbled across this problem while playing around with stylesheets to set a default cycle through different linestyles. But sometimes you want to explicitly change this behaviour.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fig, ax = plt.subplots()
ax.set_prop_cycle('linewidth', [2, 3, 4])
for c in range(5):
    ax.plot(np.arange(10), c * np.arange(10), lw=0.1)"><pre class="notranslate"><span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>()
<span class="pl-s1">ax</span>.<span class="pl-en">set_prop_cycle</span>(<span class="pl-s">'linewidth'</span>, [<span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>])
<span class="pl-k">for</span> <span class="pl-s1">c</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">5</span>):
    <span class="pl-s1">ax</span>.<span class="pl-en">plot</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>), <span class="pl-s1">c</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>), <span class="pl-s1">lw</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>)</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9482218/14878368/67b54a4e-0d23-11e6-8c1e-5e5f2d777a0b.png"><img src="https://cloud.githubusercontent.com/assets/9482218/14878368/67b54a4e-0d23-11e6-8c1e-5e5f2d777a0b.png" alt="broken" style="max-width: 100%;"></a></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fig, ax = plt.subplots()
ax.set_prop_cycle('linewidth', [2, 3, 4])
for c in range(5):
    ax.plot(np.arange(10), c * np.arange(10), linewidth=0.1)"><pre class="notranslate"><span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>()
<span class="pl-s1">ax</span>.<span class="pl-en">set_prop_cycle</span>(<span class="pl-s">'linewidth'</span>, [<span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>])
<span class="pl-k">for</span> <span class="pl-s1">c</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">5</span>):
    <span class="pl-s1">ax</span>.<span class="pl-en">plot</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>), <span class="pl-s1">c</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>), <span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>)</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9482218/14878374/6bc90d00-0d23-11e6-8f82-5e939869f28a.png"><img src="https://cloud.githubusercontent.com/assets/9482218/14878374/6bc90d00-0d23-11e6-8f82-5e939869f28a.png" alt="working" style="max-width: 100%;"></a></p>
<p dir="auto">If the <code class="notranslate">axes.prop_cycle</code> contains the label 'ls' it is not possible to manually specify a linestyle in a plot. However, if <code class="notranslate">axes.prop_cycle</code> contains the label 'linestyle', everything seems to work as expected.</p>
<p dir="auto">An example showing the problem:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from cycler import cycler
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
mpl.__version__  # ==1.5.1

linestyle_cycle = cycler('linestyle', ['-', '--'])
ls_cycle = cycler('ls', ['-', '--'])

x = np.arange(10)

mpl.rcParams['axes.prop_cycle'] = linestyle_cycle
plt.figure()
for k in range(1, 6):
    plt.plot(x, k * x)
plt.plot(x, x**2, 'k:')  # Black dotted as expected
plt.title('linestyle_cycle')

mpl.rcParams['axes.prop_cycle'] = ls_cycle
plt.figure()
for k in range(1, 6):
    plt.plot(x, k * x)
plt.plot(x, x**2, 'k:')  # Black dashed - not expected
plt.title('ls_cycle')"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">cycler</span> <span class="pl-k">import</span> <span class="pl-s1">cycler</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">as</span> <span class="pl-s1">mpl</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">mpl</span>.<span class="pl-s1">__version__</span>  <span class="pl-c"># ==1.5.1</span>

<span class="pl-s1">linestyle_cycle</span> <span class="pl-c1">=</span> <span class="pl-en">cycler</span>(<span class="pl-s">'linestyle'</span>, [<span class="pl-s">'-'</span>, <span class="pl-s">'--'</span>])
<span class="pl-s1">ls_cycle</span> <span class="pl-c1">=</span> <span class="pl-en">cycler</span>(<span class="pl-s">'ls'</span>, [<span class="pl-s">'-'</span>, <span class="pl-s">'--'</span>])

<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>)

<span class="pl-s1">mpl</span>.<span class="pl-s1">rcParams</span>[<span class="pl-s">'axes.prop_cycle'</span>] <span class="pl-c1">=</span> <span class="pl-s1">linestyle_cycle</span>
<span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()
<span class="pl-k">for</span> <span class="pl-s1">k</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">1</span>, <span class="pl-c1">6</span>):
    <span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">k</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">x</span><span class="pl-c1">**</span><span class="pl-c1">2</span>, <span class="pl-s">'k:'</span>)  <span class="pl-c"># Black dotted as expected</span>
<span class="pl-s1">plt</span>.<span class="pl-en">title</span>(<span class="pl-s">'linestyle_cycle'</span>)

<span class="pl-s1">mpl</span>.<span class="pl-s1">rcParams</span>[<span class="pl-s">'axes.prop_cycle'</span>] <span class="pl-c1">=</span> <span class="pl-s1">ls_cycle</span>
<span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()
<span class="pl-k">for</span> <span class="pl-s1">k</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">1</span>, <span class="pl-c1">6</span>):
    <span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">k</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">x</span><span class="pl-c1">**</span><span class="pl-c1">2</span>, <span class="pl-s">'k:'</span>)  <span class="pl-c"># Black dashed - not expected</span>
<span class="pl-s1">plt</span>.<span class="pl-en">title</span>(<span class="pl-s">'ls_cycle'</span>)</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5367057/12392263/f2a97cd6-bded-11e5-93fe-5c480e4b7e7f.png"><img src="https://cloud.githubusercontent.com/assets/5367057/12392263/f2a97cd6-bded-11e5-93fe-5c480e4b7e7f.png" alt="linestyle_cycle" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5367057/12392264/f2aa189e-bded-11e5-8c3b-e0db4465c1c1.png"><img src="https://cloud.githubusercontent.com/assets/5367057/12392264/f2aa189e-bded-11e5-8c3b-e0db4465c1c1.png" alt="ls_cycle" style="max-width: 100%;"></a></p>