PERF: improve plotting performance by not stringifying all x data
State: closed

Closes #18236

Currently when plotting all x / index data are converted to strings, while you typically only need a few tick labels. So when you have a lot of data, this cause the pandas plotter to be hugely slower than needed (and than a pure matplotlib one)

On master:

```
[ 33.33%] ··· Running plotting.Plotting.time_frame_plot                        4.43s
[ 50.00%] ··· Running plotting.Plotting.time_series_plot                       4.19s
[ 66.67%] ··· Running plotting.TimeseriesPlotting.time_plot_irregular          72.2±0.2ms
[ 83.33%] ··· Running plotting.TimeseriesPlotting.time_plot_regular            108±0.5ms
[100.00%] ··· Running plotting.TimeseriesPlotting.time_plot_regular_compat     71.5±0.8ms
```

with this branch:

```
[ 33.33%] ··· Running plotting.Plotting.time_frame_plot                        132±20ms
[ 50.00%] ··· Running plotting.Plotting.time_series_plot                       71.4±30ms
[ 66.67%] ··· Running plotting.TimeseriesPlotting.time_plot_irregular          58.7±0.5ms
[ 83.33%] ··· Running plotting.TimeseriesPlotting.time_plot_regular            96.9±2ms
[100.00%] ··· Running plotting.TimeseriesPlotting.time_plot_regular_compat     57.4±0.8ms
```

So for very simple plot when from 4s to ca 100ms (which is much closer to the pure matplotlib performance)

Labels:
name: Visualization
description: plotting
name: Performance
description: Memory or execution speed performance

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=h1) Report
> Merging [#18373](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/a172ff9dd32d7f6ba077c82b6cf6a31dcc7f2b45?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `85.71%`.

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

```diff
@@            Coverage Diff             @@
##           master   #18373      +/-   ##
==========================================
- Coverage   91.38%   91.36%   -0.02%     
==========================================
  Files         164      164              
  Lines       49797    49800       +3     
==========================================
- Hits        45508    45502       -6     
- Misses       4289     4298       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.17% <85.71%> (ø)` | :arrow_up: |
| #single | `39.55% <0%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `82.49% <85.71%> (+0.03%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.8% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18373?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/18373?src=pr&el=footer). Last update [a172ff9...449c296](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=h1) Report
> Merging [#18373](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/a172ff9dd32d7f6ba077c82b6cf6a31dcc7f2b45?src=pr&el=desc) will **decrease** coverage by `0.03%`.
> The diff coverage is `85.71%`.

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

```diff
@@            Coverage Diff             @@
##           master   #18373      +/-   ##
==========================================
- Coverage   91.38%   91.34%   -0.04%     
==========================================
  Files         164      164              
  Lines       49797    49721      -76     
==========================================
- Hits        45508    45420      -88     
- Misses       4289     4301      +12
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.14% <85.71%> (-0.03%)` | :arrow_down: |
| #single | `39.61% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `82.49% <85.71%> (+0.03%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/indexes/interval.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9pbnRlcnZhbC5weQ==) | `92.52% <0%> (-0.34%)` | :arrow_down: |
| [pandas/core/indexes/category.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9jYXRlZ29yeS5weQ==) | `97.2% <0%> (-0.26%)` | :arrow_down: |
| [pandas/tseries/offsets.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvb2Zmc2V0cy5weQ==) | `96.7% <0%> (-0.23%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.8% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.42% <0%> (ø)` | :arrow_up: |
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `96.4% <0%> (+0.02%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18373?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/18373?src=pr&el=footer). Last update [a172ff9...6124860](https://codecov.io/gh/pandas-dev/pandas/pull/18373?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

lgtm. needs a whatsnew, prob ok for 0.21.1
is there an associated issue?
https://github.com/pandas-dev/pandas/issues/18236
Ah, yes, didn't see that one, but from the description this PR is exactly fixing that :-)
@TomAugspurger any comments on the content of the PR?