Added parameter to the autocorr plot and code for partial autocorr plot
State: closed

Added additional parameters to the autocorrelation_plot to be able to plot a specified number of lags and additional code for plotting the partial autocorrelation plot together with p and q value.

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] Additional argument to the autocorrelation_plot allowing to plot the desired number of lags, thus increase clarity and readibility of the plot. Additional function allowing to plot partial autocorrelation code depending on the statsmodels library.


Labels:
name: Enhancement
name: Visualization
description: plotting

Comments:
Hello @colonder! Thanks for updating the PR.

 - In the file [`pandas/plotting/_misc.py`](https://github.com/pandas-dev/pandas/blob/4b9a399a88067778dca946db1ecf96a3290842f4/pandas/plotting/_misc.py), following are the PEP8 issues :

> [Line 627:13](https://github.com/pandas-dev/pandas/blob/4b9a399a88067778dca946db1ecf96a3290842f4/pandas/plotting/_misc.py#L627): [E128](https://duckduckgo.com/?q=pep8%20E128) continuation line under-indented for visual indent
> [Line 657:1](https://github.com/pandas-dev/pandas/blob/4b9a399a88067778dca946db1ecf96a3290842f4/pandas/plotting/_misc.py#L657): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 658:1](https://github.com/pandas-dev/pandas/blob/4b9a399a88067778dca946db1ecf96a3290842f4/pandas/plotting/_misc.py#L658): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace



##### Comment last updated on June 06, 2018 at 22:24 Hours UTC
Thanks for the PR!  You're going to also need to add a `whatsnew` entry (likely in `0.24.0`) as well as tests.

cc @TomAugspurger 
Oh, alright, I will do my best to correct all the things. Thanks, for all the comments and hints.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21302?src=pr&el=h1) Report
> Merging [#21302](https://codecov.io/gh/pandas-dev/pandas/pull/21302?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/4274b840e64374a39a0285c2174968588753ec35?src=pr&el=desc) will **decrease** coverage by `0.03%`.
> The diff coverage is `8%`.

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

```diff
@@            Coverage Diff             @@
##           master   #21302      +/-   ##
==========================================
- Coverage   91.85%   91.81%   -0.04%     
==========================================
  Files         153      153              
  Lines       49546    49567      +21     
==========================================
+ Hits        45509    45510       +1     
- Misses       4037     4057      +20
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.21% <8%> (-0.04%)` | :arrow_down: |
| #single | `41.85% <8%> (-0.02%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21302?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_misc.py](https://codecov.io/gh/pandas-dev/pandas/pull/21302/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19taXNjLnB5) | `36.57% <8%> (-2.42%)` | :arrow_down: |

------

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

can you rebase and update
closing as stale. if you'd like to continue pls ping.