BUG: strange timeseries plot behavior
State: closed

I added a test with the simple repro at the top of bug #6608, which appears to be the missing piece for the bug to be closed.

I went back in time to a previous version of pandas, and I confirmed the issue.
```
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
>>> import datetime
>>>
>>> s1 = pd.Series([1, 2, 3], index=[datetime.datetime(1995, 12, 31), datetime.datetime(2000, 12, 31), datetime.datetime(2005, 12, 31)])
>>> s2 = pd.Series([1, 2, 3], index=[datetime.datetime(1997, 12, 31), datetime.datetime(2003, 12, 31), datetime.datetime(2008, 12, 31)])
>>>
>>> ax = s1.plot()
>>> s2.plot(ax=ax)
<matplotlib.axes._subplots.AxesSubplot object at 0x04ECED10>
>>> s1.plot(ax=ax)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Projects\Sprints\PandasVirtualEnvLatest\PandasVirtualEnvLatest\oldpy27\lib\site-packages\pandas\tools\plotting.py", line 1829, in plot_series
    plot_obj.generate()
  File "C:\Projects\Sprints\PandasVirtualEnvLatest\PandasVirtualEnvLatest\oldpy27\lib\site-packages\pandas\tools\plotting.py", line 905, in generate
    self._make_plot()
  File "C:\Projects\Sprints\PandasVirtualEnvLatest\PandasVirtualEnvLatest\oldpy27\lib\site-packages\pandas\tools\plotting.py", line 1317, in _make_plot
    self._make_ts_plot(data, **self.kwds)
  File "C:\Projects\Sprints\PandasVirtualEnvLatest\PandasVirtualEnvLatest\oldpy27\lib\site-packages\pandas\tools\plotting.py", line 1388, in _make_ts_plot
    _plot(data, 0, ax, label, self.style, **kwds)
  File "C:\Projects\Sprints\PandasVirtualEnvLatest\PandasVirtualEnvLatest\oldpy27\lib\site-packages\pandas\tools\plotting.py", line 1372, in _plot
    style=style, **kwds)
  File "C:\Projects\Sprints\PandasVirtualEnvLatest\PandasVirtualEnvLatest\oldpy27\lib\site-packages\pandas\tseries\plotting.py", line 82, in tsplot
    left, right = _get_xlim(ax.get_lines())
  File "C:\Projects\Sprints\PandasVirtualEnvLatest\PandasVirtualEnvLatest\oldpy27\lib\site-packages\pandas\tseries\plotting.py", line 226, in _get_xlim
    left = min(x[0].ordinal, left)
AttributeError: 'datetime.datetime' object has no attribute 'ordinal'
>>> print(pd.__version__)
0.13.1
>>>
```


Labels:
name: Visualization
description: plotting

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16461?src=pr&el=h1) Report
> Merging [#16461](https://codecov.io/gh/pandas-dev/pandas/pull/16461?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/92372c7632a92d7bd980534b5a78590b2d9453ad?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16461/graphs/tree.svg?width=650&height=150&src=pr&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/16461?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16461      +/-   ##
==========================================
+ Coverage   90.42%   90.42%   +<.01%     
==========================================
  Files         161      161              
  Lines       51024    51027       +3     
==========================================
+ Hits        46139    46142       +3     
  Misses       4885     4885
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.26% <ø> (ø)` | :arrow_up: |
| #single | `40.17% <ø> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16461?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/reshape/reshape.py](https://codecov.io/gh/pandas-dev/pandas/pull/16461?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS9yZXNoYXBlLnB5) | `99.28% <0%> (ø)` | :arrow_up: |
| [pandas/io/excel.py](https://codecov.io/gh/pandas-dev/pandas/pull/16461?src=pr&el=tree#diff-cGFuZGFzL2lvL2V4Y2VsLnB5) | `62.31% <0%> (+0.05%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16461?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16461?src=pr&el=footer). Last update [92372c7...3fe6d64](https://codecov.io/gh/pandas-dev/pandas/pull/16461?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

lgtm (failure in CI is already resolved in master).

@TomAugspurger this is just a validation test?
> @TomAugspurger this is just a validation test?

yeah, it was accidentally fixed somewhere along the way, but didn't have a regression test
@huguesv thanks for taking care of this! (I had meant to but never got around to it, so much appreciated)