BUG: Silence `Period[B]` warnings in plotting code
State: closed

- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

This silences warnings introduced by https://github.com/pandas-dev/pandas/issues/53446 that would happen during normal plotting activity.


Labels:
name: Visualization
description: plotting
name: Frequency
description: DateOffsets
name: Warnings
description: Warnings that appear or should be added to pandas

Comments:
Anything else I can do here to get this merged?
> Thanks. Could you add a whatsnew note to `2.1.2.rst`?

Sure thing, @mroeschke, that's done now. Admittedly not completely sure I respected the style of both the entry and the corresponding commit message correctly, apologies in advance if it's not the case!
Thanks @torext 
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
git checkout 2.1.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 6e6a6831aaa2d1606aa897b34f106e655180034b
```

3. You will likely have some merge/cherry-pick conflict here, fix them and commit:

```
git commit -am 'Backport PR #55138: BUG: Silence `Period[B]` warnings in plotting code'
```

4. Push to a named branch:

```
git push YOURFORK 2.1.x:auto-backport-of-pr-55138-on-2.1.x
```

5. Create a PR against branch 2.1.x, I would have named this PR:

> "Backport PR #55138 on branch 2.1.x (BUG: Silence `Period[B]` warnings in plotting code)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
                
@meeseeksdev backport 2.1.x
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
git checkout 2.1.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 6e6a6831aaa2d1606aa897b34f106e655180034b
```

3. You will likely have some merge/cherry-pick conflict here, fix them and commit:

```
git commit -am 'Backport PR #55138: BUG: Silence `Period[B]` warnings in plotting code'
```

4. Push to a named branch:

```
git push YOURFORK 2.1.x:auto-backport-of-pr-55138-on-2.1.x
```

5. Create a PR against branch 2.1.x, I would have named this PR:

> "Backport PR #55138 on branch 2.1.x (BUG: Silence `Period[B]` warnings in plotting code)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).