<p dir="auto">I'm using the latest matplotlib and pandas.  If you run the following code, do the legends look right to you?  The unit tests don't like them.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df = DataFrame(
            np.random.rand(10, 3),
            index=list(string.ascii_letters[:10]))
df.plot(kind='area', subplots=True, sharex=True, legend=True)"><pre class="notranslate"><span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-v">DataFrame</span>(
            <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">10</span>, <span class="pl-c1">3</span>),
            <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-en">list</span>(<span class="pl-s1">string</span>.<span class="pl-s1">ascii_letters</span>[:<span class="pl-c1">10</span>]))
<span class="pl-s1">df</span>.<span class="pl-en">plot</span>(<span class="pl-s1">kind</span><span class="pl-c1">=</span><span class="pl-s">'area'</span>, <span class="pl-s1">subplots</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">sharex</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">legend</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</pre></div>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Setup
import pandas as pd
dates = pd.to_datetime(range(1,300), unit='D', origin=pd.Timestamp('2000-01-01'))
se = pd.Series(range(1,300),dates)
df = pd.DataFrame(se).reset_index()

# The problem:
&gt;&gt;&gt; df
         index    0
0   2000-01-02    1
1   2000-01-03    2
2   2000-01-04    3
3   2000-01-05    4
4   2000-01-06    5
5   2000-01-07    6
..         ...  ...
294 2000-10-22  295
295 2000-10-23  296
296 2000-10-24  297
297 2000-10-25  298
298 2000-10-26  299

[299 rows x 2 columns]
&gt;&gt;&gt; pd.Series(df['index'], index = df[0])
0
1     2000-01-03
2     2000-01-04
3     2000-01-05
4     2000-01-06
5     2000-01-07
         ...
295   2000-10-23
296   2000-10-24
297   2000-10-25
298   2000-10-26
299          NaT
Name: index, Length: 299, dtype: datetime64[ns]"><pre class="notranslate"><span class="pl-c"># Setup</span>
<span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-s1">dates</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">to_datetime</span>(<span class="pl-en">range</span>(<span class="pl-c1">1</span>,<span class="pl-c1">300</span>), <span class="pl-s1">unit</span><span class="pl-c1">=</span><span class="pl-s">'D'</span>, <span class="pl-s1">origin</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-v">Timestamp</span>(<span class="pl-s">'2000-01-01'</span>))
<span class="pl-s1">se</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-en">range</span>(<span class="pl-c1">1</span>,<span class="pl-c1">300</span>),<span class="pl-s1">dates</span>)
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">se</span>).<span class="pl-en">reset_index</span>()

<span class="pl-c"># The problem:</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>
         <span class="pl-s1">index</span>    <span class="pl-c1">0</span>
<span class="pl-c1">0</span>   <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">02</span>    <span class="pl-c1">1</span>
<span class="pl-c1">1</span>   <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">03</span>    <span class="pl-c1">2</span>
<span class="pl-c1">2</span>   <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">04</span>    <span class="pl-c1">3</span>
<span class="pl-c1">3</span>   <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">05</span>    <span class="pl-c1">4</span>
<span class="pl-c1">4</span>   <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">06</span>    <span class="pl-c1">5</span>
<span class="pl-c1">5</span>   <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">07</span>    <span class="pl-c1">6</span>
..         ...  ...
<span class="pl-c1">294</span> <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">22</span>  <span class="pl-c1">295</span>
<span class="pl-c1">295</span> <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">23</span>  <span class="pl-c1">296</span>
<span class="pl-c1">296</span> <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">24</span>  <span class="pl-c1">297</span>
<span class="pl-c1">297</span> <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">25</span>  <span class="pl-c1">298</span>
<span class="pl-c1">298</span> <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">26</span>  <span class="pl-c1">299</span>

[<span class="pl-c1">299</span> <span class="pl-s1">rows</span> <span class="pl-s1">x</span> <span class="pl-c1">2</span> <span class="pl-s1">columns</span>]
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">df</span>[<span class="pl-s">'index'</span>], <span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>[<span class="pl-c1">0</span>])
<span class="pl-c1">0</span>
<span class="pl-c1">1</span>     <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">03</span>
<span class="pl-c1">2</span>     <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">04</span>
<span class="pl-c1">3</span>     <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">05</span>
<span class="pl-c1">4</span>     <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">06</span>
<span class="pl-c1">5</span>     <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">07</span>
         ...
<span class="pl-c1">295</span>   <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">23</span>
<span class="pl-c1">296</span>   <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">24</span>
<span class="pl-c1">297</span>   <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">25</span>
<span class="pl-c1">298</span>   <span class="pl-c1">2000</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">26</span>
<span class="pl-c1">299</span>          <span class="pl-v">NaT</span>
<span class="pl-v">Name</span>: <span class="pl-s1">index</span>, <span class="pl-v">Length</span>: <span class="pl-c1">299</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">datetime64</span>[<span class="pl-s1">ns</span>]</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">The commands above should not generate any NaT.</p>
<p dir="auto">In a real life case, I tried to do the same thing with 56355 rows and had 53913 NaT at the end.</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">No NaT<br>
My current work around is: <code class="notranslate">df.set_index('0')</code></p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
&gt;&gt;&gt; pd.show_versions()
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.6.1.final.0<br>
python-bits: 64<br>
OS: Darwin<br>
OS-release: 16.6.0<br>
machine: x86_64<br>
processor: i386<br>
byteorder: little<br>
LC_ALL: en_US.UTF-8<br>
LANG: en_US.UTF-8<br>
LOCALE: en_US.UTF-8</p>
<p dir="auto">pandas: 0.20.2<br>
pytest: None<br>
pip: 9.0.1<br>
setuptools: 28.8.0<br>
Cython: None<br>
numpy: 1.13.0<br>
scipy: 0.19.0<br>
xarray: None<br>
IPython: 6.0.0<br>
sphinx: None<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: None<br>
feather: None<br>
matplotlib: 2.0.2<br>
openpyxl: 2.4.8<br>
xlrd: 1.0.0<br>
xlwt: None<br>
xlsxwriter: 0.9.6<br>
lxml: None<br>
bs4: None<br>
html5lib: 0.999999999<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.6<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>