Closed
Description
Bug summary
Hi, sorry to bother if it is not an issue at all.
Setting title first and then making polar plot messes up the plot and it makes the plot in usual cartesian plane
Code for reproduction
import matplotlib.pyplot as plt
theta = [0, 1, 2, 3, 4, 5, 6]
r = [0, 1, 0.5, 1, 0.5, 1, 0]
plt.title("stuff")
plt.polar(theta, r)
plt.show()
Actual outcome
It outputs a warning:
<stdin>:1: UserWarning: Trying to create polar plot on an Axes that does not have a polar projection.
And makes the plot:
Expected outcome
Although the plot should have look like this:
Additional information
No response
Operating system
OS/X
Matplotlib Version
3.9.0
Matplotlib Backend
macosx
Python version
Python 3.12.0
Jupyter version
No response
Installation
pip