pydata/pandas — pull request #4722 by jorisvandenbossche (2013-09-01 08:47:05+00:00)
Title: PERF: faster plotting of timeseries with PeriodIndex

See discussion in #4705.

This improves the speed of plotting timeseries with PeriodIndex (or with DatetimeIndex that is converted to a PeriodIndex during plotting) drastically: from 30 s in 0.12 (but 7 s in 0.11) to 0.2 s with this commit for the plotting of following data:

```python
N = 10000
M = 25
df = pd.DataFrame(np.random.randn(N,M), index=pd.date_range('1/1/1975', periods=N))
df.plot()
```

Some questions I still have:
- I added a check for `PeriodIndex`, but I left the original `if isinstance(values, Index)` in place. Is this needed? Is it possible that another index than PeriodIndex ends up in PeriodConverter?
- @jreback You asked in the issue to do some tests (to at least ensure that their is a valid plot). Do you just mean by plotting it and looking if it seems OK? This seems OK. Or can you do some tests for plotting in the testing infrastructure?
- Would it be interesting to add a performance test for this case? Because it was a big decrease in speed with 0.12 which was not detected.