BUG: secondary y axis could not be set to log scale (#25545)
State: closed

- [x] closes #25545
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Visualization
description: plotting

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

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

```diff
@@            Coverage Diff             @@
##           master   #25586      +/-   ##
==========================================
- Coverage   91.26%   91.25%   -0.01%     
==========================================
  Files         173      173              
  Lines       52966    52968       +2     
==========================================
+ Hits        48337    48338       +1     
- Misses       4629     4630       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.83% <50%> (-0.01%)` | :arrow_down: |
| #single | `41.71% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25586?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/25586/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `83.53% <50%> (-0.05%)` | :arrow_down: |

------

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

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

```diff
@@            Coverage Diff             @@
##           master   #25586      +/-   ##
==========================================
- Coverage   91.26%   91.25%   -0.01%     
==========================================
  Files         173      173              
  Lines       52966    52968       +2     
==========================================
+ Hits        48337    48338       +1     
- Misses       4629     4630       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.83% <50%> (-0.01%)` | :arrow_down: |
| #single | `41.71% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25586?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/25586/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `83.53% <50%> (-0.05%)` | :arrow_down: |

------

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

Codecov seems to think that my new line of code
```
new_ax.set_yscale('log')
```
was not covered by the tests. Is this because tests marked with `@pytest.mark.slow` are not included in the coverage calculations?
You can probably ignore codecov on this one. It tricky to know exactly which tests are run with which dependencies on our coverage runs.
@TomAugspurger : This PR is green.  Are we still porting to `0.24.2` ?  (I noticed you didn't label as such, so wasn't sure)
Yep, forgot to set the milestone.

Thanks @johan12345!
Thank you!