8000 Fix #6773: Don't do image extent adjustment... by mdboom · Pull Request #6776 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix #6773: Don't do image extent adjustment... #6776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Test for rectiliear using Axes.patch
  • Loading branch information
mdboom committed Oct 17, 2016
commit 97b62bcd025ef322d07e65e53f0d07d23556ec03
4 changes: 2 additions & 2 deletions lib/matplotlib/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import matplotlib.colors as mcolors
import matplotlib.cm as cm
import matplotlib.cbook as cbook
from matplotlib import patches as mpatches

# For clarity, names from _image are given explicitly in this module:
import matplotlib._image as _image
Expand Down Expand Up @@ -346,8 +347,7 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
# non-rectangular axes, this refinement isn't required.
if (round_to_pixel_border and
t.is_affine and
# deliberate exact class match
type(self.axes) in (maxes.Axes, maxes._subplots.Subplot) and
isinstance(self.axes, mpatches.Rectangle) and
(out_width_base % 1.0 != 0.0 or
out_height_base % 1.0 != 0.0)):
out_width = int(ceil(out_width_base) + 1)
Expand Down
0