Hi Jae-Joon, On Sun, Mar 22, 2009 at 8:55 PM, Jae-Joon Lee <lee.j.j...@gmail.com> wrote: > Hi Eric, > > Have you find a solution for your problem? > I recently encountered a similar problem. > In my case, the images (I'm rasterizing the pcolormesh) are in wrong > size if the output dpi is other than 72. > And I guess this is related with the changes Jouni made in revision 6730. > > So, can you see if you have a correct output with dpi=72? > If that's the case, can you try the attached patch and see if it > solves your problem (should work with dpi other than 72).
I hadn't found a solution (other than rendering to svg), so thanks for waking up this thread. I can confirm that I get the correct output when I set dpi=72. > I don't quite like my solution but it seems to work. > It passes over the figure instance when initializing the > MixedRenderer, and let the renderer change the dpi of the figure when > changing the backend. > I hope some other developer who better understands the dpi thing take > a look and come up with a better solution. I'll try to take a look at this later this afternoon. I agree that someone with more knowledge should take a look. The SVG backend seems to just ignore the dpi setting and forces 72 dpi across the board, which is why I was able to use it as a workaround. Thanks, Eric > > Regards, > > -JJ > > > On Thu, Feb 19, 2009 at 4:01 PM, Eric Bruning <eric.brun...@gmail.com> wrote: >> I just updated to the latest svn, and unveiled a bug that's evident >> when using mixed-mode rendering in the PDF backend. I'm suspect I'm >> the only one running my patch that enables set_rasterized on a >> per-artist basis, so I'm the only one that's seeing it. :) Artists >> that are left in vector mode are plotted correctly, while artists that >> are rasterized are squished down toward the lower left corner of the >> axes. >> >> Looking at the svn log, I suspect it's the changes to the path >> simplification code (r6847) doing something funky at the transforms >> level. Is that the right place to start looking? Any tips on how to >> track this down? >> >> Thanks, >> Eric >> >> >> Sample code to reproduce the problem: >> >> import numpy >> from matplotlib.pyplot import subplot, get_cmap, scatter, colorbar, show >> basecolors = get_cmap('gist_yarg') >> colormap, normer = basecolors, None #LogNorm() >> x = y = c = numpy.arange(10) +1 >> dummy = scatter(x,y,c=c,cmap=colormap)#, norm=normer) >> cbar = colorbar(dummy)#, spacing='proportional',ticks=isolevels.levels) >> dummy.set_rasterized(True) >> dummy.figure.savefig('raster_test.pdf') >> >> ------------------------------------------------------------------------------ >> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA >> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise >> -Strategies to boost innovation and cut costs with open source participation >> -Receive a $600 discount off the registration fee with the source code: SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ >> Matplotlib-devel mailing list >> Matplotlib-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel >> > ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel