-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Svg rasterize resolution fix #1185
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
Closed
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
309c93c
fixed: compare_images for older numpy versions. added: backend_pdf al…
cb1aa37
fix: dpi setting should work now for rasterization in svg backend
868f411
update for my patch
98ab64e
update for my patch
7eacb85
update for my patch
f56a455
api change
c610462
added test result images
dc0a819
added note to whats_new.rst
d6f4931
added a note to changelog
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
fixed: compare_images for older numpy versions. added: backend_pdf al…
…lows numpy.float32 in pdfRepr
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,8 +308,8 @@ def compare_images( expected, actual, tol, in_decorator=False ): | |
h1p = expectedImage[:,:,i] | ||
h2p = actualImage[:,:,i] | ||
|
||
h1h = np.histogram(h1p, bins=bins)[0] | ||
h2h = np.histogram(h2p, bins=bins)[0] | ||
h1h = np.histogram(h1p, bins=ns)[0] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pretty sure this has been fixed by another PR in a different place ( |
||
h2h = np.histogram(h2p, bins=ns)[0] | ||
|
||
rms += np.sum(np.power((h1h-h2h), 2)) | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason why we shouldn't use
cbook.is_numlike
andcbook.is_scalar
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmcdougall Why would you want to use cbook.is_numlike or is_scalar here? In any case, it looks like a change to the line in question has already been made by another PR.
@mwelter, I don't think this PR should be touchiung backend_pdf at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@efiring Hmmm. I thought a numpy version independent way of checking whether something was a number would be neater. I guess we do actually want floating point numbers here. I can't find a cbook.is_floatlike, so this way is probably better, you're right.