Remove maybe unused function
This is a private function that's only a part of one `xfail` test. I wonder if it's possible to remove it or not, given that the current minimum required version of `matplotlib` is already `3.6.3`. 
Thanks @tqa236 