Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug summary
I would like to create a polar plot without the grid lines. When usingax.set_xticks([])
(and/or yticks/rticks) the plot appears distorted.
Code for reproduction
importnumpyasnpimportmatplotlib.pyplotaspltD=np.array([[2,.3],[.3,2.5]])# creating an ellipse)lam,vec=np.linalg.eigh(D)theta=np.linspace(-np.pi,np.pi,1001)xy=np.stack((lam[0]*np.cos(theta),lam[1]*np.sin(theta)),axis=0)xy=vec.T@xyradii=np.sqrt(np.sum(xy**2,axis=0))thetas=np.arctan2(-xy[1],xy[0])plt.figure()# with ticksax1=plt.subplot(121,projection='polar')ax1.plot(thetas,radii)# without ticksax2=plt.subplot(122,projection='polar')ax2.plot(thetas,radii)ax2.set_yticks([])ax2.set_xticks([])plt.show()
Actual outcome

Expected outcome

Additional information
No response
Operating system
OS/X and Linux
Matplotlib Version
3.10.0
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
3.10
Jupyter version
No response
Installation
None