TST: avoid matplotlib warnings in tests
State: closed

In master we get the following warnings in this file:

```
$ pytest pandas/tests/plotting/test_frame.py --skip-slow
[...]

pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_mpl2_color_cycle_str
  pandas/pandas/plotting/_style.py:60: MatplotlibDeprecationWarning: Support for uppercase single-letter colors is deprecated since Matplotlib 3.1 and will be removed in 3.3; please use lowercase instead.
    [conv.to_rgba(c) for c in colors]

pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_subplots_timeseries_y_axis
  pandas/pandas/plotting/_core.py:384: FutureWarning: Converting timezone-aware DatetimeArray to timezone-naive ndarray with 'datetime64[ns]' dtype. In the future, this will return an ndarray with 'object' dtype where each element is a 'pandas.Timestamp' with the correct 'tz'.
  	To accept the future behavior, pass 'dtype=object'.
  	To keep the old behavior, pass 'dtype="datetime64[ns]"'.
    numeric_data[col] = np.asarray(numeric_data[col])

pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
pandas/tests/plotting/test_frame.py::TestDataFramePlots::test_line_area_stacked
  pandas/pandas/plotting/_core.py:1014: UserWarning: Attempted to set non-positive left xlim on a log-scaled axis.
  Invalid limit will be ignored.
    ax.set_xlim(left, right)
```

This PR addresses first and third of these.  The middle one is the topic of #26676.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Visualization
description: plotting

Comments:
Interesting I saw the same error in my PR:
```
   raise_assert_detail(obj, '{0} length are different'.format(obj),
E   AssertionError: Iterable are different
E   
E   Iterable length are different
E   [left]:  133
E   [right]: 128
E   [diff]: ['e', 'msg', 'missing_dependencies', 'dependency', 'hard_dependencies']
```
https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=12339

Might raise an issue?
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26678?src=pr&el=h1) Report
> Merging [#26678](https://codecov.io/gh/pandas-dev/pandas/pull/26678?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/c9c6c221865f2988c0f52dcada6b033afaf23a8a?src=pr&el=desc) will **decrease** coverage by `50.1%`.
> The diff coverage is `n/a`.

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

```diff
@@             Coverage Diff             @@
##           master   #26678       +/-   ##
===========================================
- Coverage   91.88%   41.78%   -50.11%     
===========================================
  Files         174      174               
  Lines       50694    50663       -31     
===========================================
- Hits        46581    21168    -25413     
- Misses       4113    29495    +25382
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `?` | |
| #single | `41.78% <ø> (-0.21%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26678?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/formats/latex.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvbGF0ZXgucHk=) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/io/sas/sas\_constants.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXNfY29uc3RhbnRzLnB5) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/core/groupby/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9jYXRlZ29yaWNhbC5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/tseries/plotting.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvcGxvdHRpbmcucHk=) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/tseries/converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvY29udmVydGVyLnB5) | `0% <0%> (-100%)` | :arrow_down: |
| [pandas/io/formats/html.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvaHRtbC5weQ==) | `0% <0%> (-99.37%)` | :arrow_down: |
| [pandas/io/sas/sas7bdat.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXM3YmRhdC5weQ==) | `0% <0%> (-91.16%)` | :arrow_down: |
| [pandas/io/sas/sas\_xport.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXNfeHBvcnQucHk=) | `0% <0%> (-90.1%)` | :arrow_down: |
| [pandas/core/sparse/scipy\_sparse.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL3NjaXB5X3NwYXJzZS5weQ==) | `10.14% <0%> (-89.86%)` | :arrow_down: |
| [pandas/core/tools/numeric.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdG9vbHMvbnVtZXJpYy5weQ==) | `10.14% <0%> (-89.86%)` | :arrow_down: |
| ... and [128 more](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26678?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/26678?src=pr&el=footer). Last update [c9c6c22...1233ae0](https://codecov.io/gh/pandas-dev/pandas/pull/26678?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/26678?src=pr&el=h1) Report
> Merging [#26678](https://codecov.io/gh/pandas-dev/pandas/pull/26678?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/5b10e31fbf2707f354c2ffe287b434f10a8651d1?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #26678      +/-   ##
==========================================
- Coverage   91.88%   91.87%   -0.01%     
==========================================
  Files         174      174              
  Lines       50699    50699              
==========================================
- Hits        46587    46582       -5     
- Misses       4112     4117       +5
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.41% <ø> (ø)` | :arrow_up: |
| #single | `41.91% <ø> (-0.11%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26678?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `78.94% <0%> (-10.53%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26678/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.6% <0%> (-0.11%)` | :arrow_down: |

------

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

@alimcmaster1 is the issue you mentioned affecting all PRs or just these two?
> @alimcmaster1 is the issue you mentioned affecting all PRs or just these two?

It was a temporary failure (due to me merging something that should not have been merged) that is fixed by now.
Thanks!