Svg rasterize (rebased) #2044

Merged
merged 9 commits into from May 24, 2013

3 participants

@mdboom
Matplotlib Developers member

This is a rebased version of #1185. It also updates some test images and adds get_image_magnification to the RendererBase class at @pelson's suggestion.

@mdboom
Matplotlib Developers member

The matplotlib.tests.test_image.test_rasterize_dpi.test is failing on Travis, but I can't reproduce locally. Is anyone else able to reproduce, and maybe could post the result image here?

@mdboom
Matplotlib Developers member

Nevermind -- got it reproduced. I'm on it.

@mdboom mdboom closed this May 24, 2013
@mdboom mdboom reopened this May 24, 2013
@mdboom
Matplotlib Developers member

Hmm.. github seems to be borked here. The tip of this branch is f288b4e (which I just verified by doing a clean clone), but it's displaying 90143c0, both here and at https://github.com/mdboom/matplotlib/commits/svg-rasterize. Looks like a bug report to github might be in order.

@mdboom mdboom closed this May 24, 2013
@mdboom mdboom reopened this May 24, 2013
@mdboom
Matplotlib Developers member

Weird. It's update now. Never seen it take that long before.

@mdboom mdboom merged commit f262892 into matplotlib:master May 24, 2013

1 check passed

Details default The Travis CI build passed
@pelson pelson commented on the diff May 28, 2013
lib/matplotlib/tests/test_image.py
@@ -264,6 +264,31 @@ def test_image_composite_alpha():
ax.set_ylim([5, 0])
+@image_comparison(baseline_images=['rasterize_10dpi'], extensions=['pdf','svg'], tol=1.5e-3, remove_text=True)
@pelson
Matplotlib Developers member
pelson added a line comment May 28, 2013

Looks like this test is failing on Python 3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@megies

@mdboom, while debugging way too low RMS values in our own project's image tests (seems to happen for a combination of matplotlib 1.2 and numpy 1.7) I had a look at this. The injected code is without effect, rms is overwritten right afterwards in line 339.

Matplotlib Developers member

Looks to be true. If you want to submit a PR deleting this code I'd happily merge it :-)

P.S. From memory, the RMS values have changed in magnitude between v1.2 and v1.3.

Yes, the whole RMS calculation was turned upside down between 1.2 and 1.3.
I would have opened a PR already had I known what to make of this piece of code.. Since it was only introduced with the third-to-last change to the file it felt like it should be in there but just wasn't included in the right way. It looks like it was cherry-picked in here (?) and might have gotten garbled up in the process (?)..

Matplotlib Developers member

I've made a PR in #2426. (Disappointingly, it doesn't seem to have a measurable impact on the time required to run the tests...)

@mdboom mdboom deleted the mdboom:svg-rasterize branch Aug 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment