8000 polar limits not snapping to 0 · Issue #9887 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
polar limits not snapping to 0 #9887
Closed
Closed
@snoopyhunter2

Description

@snoopyhunter2

Bug report

In matplotlib 2.1 radial lines starting at r = 0 do not start at the origin of the graph, because the r = 0 circle has a non-zero radius.

Code for reproduction

import matplotlib.pyplot as plt

r = [1.9, 2, 2.1]
theta = [0.5, 0.75, 1]

fig = plt.figure(figsize=(5, 5))
ax = plt.subplot(111, projection = 'polar')

for i in range(len(r)):
    ax.plot([0, theta[i]], [0, r[i]])
    
fig.savefig('phases.pdf', format = 'pdf')

Actual outcome

phases
(converted to png)

Expected outcome

Outcome in matplotlib 2.0.2:

outcome
(converted to png)

Matplotlib version

  • Operating system: Ubuntu 16.04 / also on macOS 10.13.1
  • Matplotlib version: 2.1.0
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 3.6.3
  • Other libraries:

I use python from conda, latest update, and downgraded matplotlib to 2.0.2 to produce the second figure.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0