TST: fix errant tight_layout test
State: closed

closes #9351

Labels:
name: Visualization
description: plotting

Comments:
Why is it needed to remove this test?
The test itself is incorrect because the `2` should be a `3` (not my best moment, this was). Additionally, this is patched in `matplotlib 2.0.1`, not `matplotlib 2.0.0` as indicated here. So to keep the test around, we would need to modify when it skips.

More substantially, this bug was actually a bug in `matplotlib`, which I fixed and added a regression test for in their test suite. `pandas` doesn't *really* need to duplicate it.
Ah, the reason that it is 2 instead of 3 is the reason it now just passes, while the test should actually fail because it needs >= 2.0.1 instead of >= 2.0.0 ?

I think testing this in pandas is fine, as we should keep tight_layout working with pandas plots (we may change implementation details in the hist method that could cause problems with tight_layout)
Yes, exactly.

Hmm. OK, can do.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15671?src=pr&el=h1) Report
> Merging [#15671](https://codecov.io/gh/pandas-dev/pandas/pull/15671?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/32df1e6ae452f7ddd31dc41fa613992493eb51c4?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `66.66%`.


```diff
@@            Coverage Diff             @@
##           master   #15671      +/-   ##
==========================================
- Coverage   91.03%   91.01%   -0.03%     
==========================================
  Files         143      143              
  Lines       49380    49386       +6     
==========================================
- Hits        44953    44947       -6     
- Misses       4427     4439      +12
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15671?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/tools/plotting.py](https://codecov.io/gh/pandas-dev/pandas/compare/32df1e6ae452f7ddd31dc41fa613992493eb51c4...99cd2558f3baf9d6c9772b170d05dd9c3edfdb9d?src=pr&el=tree#diff-cGFuZGFzL3Rvb2xzL3Bsb3R0aW5nLnB5) | `71.77% <66.66%> (-0.02%)` | :x: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/compare/32df1e6ae452f7ddd31dc41fa613992493eb51c4...99cd2558f3baf9d6c9772b170d05dd9c3edfdb9d?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :x: |
| [pandas/tools/merge.py](https://codecov.io/gh/pandas-dev/pandas/compare/32df1e6ae452f7ddd31dc41fa613992493eb51c4...99cd2558f3baf9d6c9772b170d05dd9c3edfdb9d?src=pr&el=tree#diff-cGFuZGFzL3Rvb2xzL21lcmdlLnB5) | `93.61% <0%> (-0.34%)` | :x: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/compare/32df1e6ae452f7ddd31dc41fa613992493eb51c4...99cd2558f3baf9d6c9772b170d05dd9c3edfdb9d?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.87% <0%> (-0.1%)` | :x: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/compare/32df1e6ae452f7ddd31dc41fa613992493eb51c4...99cd2558f3baf9d6c9772b170d05dd9c3edfdb9d?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.3% <0%> (+0.33%)` | :white_check_mark: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15671?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/15671?src=pr&el=footer). Last update [32df1e6...99cd255](https://codecov.io/gh/pandas-dev/pandas/compare/32df1e6ae452f7ddd31dc41fa613992493eb51c4...99cd2558f3baf9d6c9772b170d05dd9c3edfdb9d?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
@jreback @jorisvandenbossche Does this look good? Tests pass.
This would close #9351.
lgtm. @jorisvandenbossche 
Thanks!