Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: Removing spines in polar plot causes distortion of the plot #30164

Open
@sjbabdi

Description

@sjbabdi

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

Image

Expected outcome

Image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp