Skip to content

Lines are not affected by changing polar limits after draw #12887

@QuLogic

Description

@QuLogic

From #12300, something funny happens if you flip the radial limits after a draw. @jklymak noted that this is also a problem on current master if you just change the limits (but no flipping.)

#!/usr/bin/env python

import numpy as np
import matplotlib.pyplot as plt

fig, (ax0, ax1, ax2) = plt.subplots(1, 3, subplot_kw=dict(polar=True))

ax0.plot([0, 1], [-1, 1])
ax0.scatter([0, 1], [-1, 1])

ax0.set_rmin(-1.5)
ax0.set_rmax(1.5)
ax0.set_title('Forward')

ax1.plot([0, 1], [-1, 1])
ax1.scatter([0, 1], [-1, 1])

ax1.set_rmin(1.5)
ax1.set_rmax(-1.5)
ax1.set_title('Backward')

ax2.plot([0, 1], [-1, 1])
ax2.scatter([0, 1], [-1, 1])

ax2.set_rmin(-1.5)
ax2.set_rmax(1.5)
ax2.set_title('Backward with draw')
fig.canvas.draw()
ax2.set_rmin(1.5)
ax2.set_rmax(-1.5)

plt.show()

figure_1

Originally posted by @QuLogic in #12300 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Actiontopic: polar

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions