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

Appearance settings

[Bug]: set_theta_offset removes grid outline #26972

Copy link
Copy link
Open
@am-thyst

Description

@am-thyst
Issue body actions

Bug summary

When producing a polar plot, set_theta_offset removes the outer gridlines.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt
fig, (ax1,ax2) = plt.subplots(1,2,subplot_kw=dict(projection='polar'))

azis = np.radians(np.linspace(0,360,72)); r = np.linspace(0, 250, 250)
dats = np.random.rand(250,72)
X,Y=np.meshgrid(azis,r)

for ax in [ax1,ax2]:
    ax.contourf(X,Y,dats,cmap="RdYlBu")

ax2.set_theta_offset(1.570796327)
plt.subplots_adjust(wspace=0.5)

Actual outcome

First axis has no "set_theta_offset", which means the plot starts at 90. Second axis has "set_theta_offset", which rotates the plot to start at 0, but it removes the black outline.

image

Expected outcome

Expect ax2 above to have a black circular outline as in ax1.

Additional information

No response

Operating system

Windows

Matplotlib Version

3.7.1

Matplotlib Backend

module://matplotlib_inline.backend_inline

Python version

3.11.3

Jupyter version

6.5.4

Installation

conda

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.