Quick suggestion:
Try removing the %matplotlib inline
line and restarting the kernel and running. Some users lately were reporting that was causing weirdness. It shouldn’t change it but it is something to try based on what you have shared.
While you are at that, remove the import matplotlib_inline
line, too. That is not necessary and could also be causing weirdness.
Please follow common guidelines and share code as code text and not a screenshot. (Please read Getting good answers to your questions . The reference in the last link there has an entire section called ‘Help others reproduce the problem’ that emphasizes images of code don’t suffice. Help others help you by giving them the code and a minimal reproducible example.)
One easy way to share a notebook as code is GitHub Gist, see the bottom section in my post here for more about that. You can even point nbviewer at it for the best experience for all, but even providing something would be a huge step.