Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

PGF Backend: Support interpolation='none'#6792

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tacaswell merged 4 commits intomatplotlib:masterfromf0k:pgf-transform
Aug 27, 2016
Merged
Changes from1 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
NextNext commit
PGF backend: skip drawing of empty images
  • Loading branch information
@f0k
f0k committedAug 16, 2016
commit468a9770fec749b0fc7dbf51b6a0e9077e64d025
4 changes: 3 additions & 1 deletionlib/matplotlib/backends/backend_pgf.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -612,6 +612,9 @@ def _pgf_path_draw(self, stroke=True, fill=False):
def draw_image(self, gc, x, y, im):
# TODO: Almost no documentation for the behavior of this function.
# Something missing?
h, w = im.shape[:2]
if w == 0 or h == 0:
return

# save the images to png files
path = os.path.dirname(self.fh.name)
Expand All@@ -623,7 +626,6 @@ def draw_image(self, gc, x, y, im):
# reference the image in the pgf picture
writeln(self.fh, r"\begin{pgfscope}")
self._print_pgf_clip(gc)
h, w = im.shape[:2]
f = 1. / self.dpi # from display coords to inch
writeln(self.fh, r"\pgftext[at=\pgfqpoint{%fin}{%fin},left,bottom]{\pgfimage[interpolate=true,width=%fin,height=%fin]{%s}}" % (x * f, y * f, w * f, h * f, fname_img))
writeln(self.fh, r"\end{pgfscope}")
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp