`gca()` with keyword arguments was deprecated in Matplotlib 3.4 using`subplot()` or `add_subplot()`may resolve the question
Activity
bugleilei commentedon Apr 26, 2022
unverozkol commentedon Oct 2, 2022
using "ax = fig.add_subplot(111, projection='3d')" solved the problem in my case
onitake commentedon Oct 24, 2022
It looks like the first argument is optional in matplotlib.
worked for me.