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 in circle patch plotting when using the same patch for two different figures #3776

Copy link
Copy link
Closed
@astrofrog

Description

@astrofrog
Issue body actions

The following code:

import numpy as np

import matplotlib.pyplot as plt
from matplotlib.patches import Circle

image = np.random.random((10,10))
c = Circle((5., 5.), 3.)

fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.imshow(image, interpolation='nearest', vmin=-2., vmax=3.)
ax.add_patch(c)
fig.savefig('nearest.png')

fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.imshow(image, vmin=-2., vmax=3.)
ax.add_patch(c)
fig.savefig('default.png')

produces the following two figures:

nearest.png [looks correct]

nearest

default.png [definitely doesn't look correct]

default

This is with the latest developer version of Matplotlib with Python 3.4.

[cc @cdeil @bsipocz @larrybradley - this is the issue that is causing https://github.com/astropy/photutils/pull/114#issuecomment-48383187]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    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.