Hi all, So I figured out the magic of "rasterized=True", which is *really* helpful! However, the colorbar doesn't seem to accept rasterized=True, so there are little lines every facet (zoom on the attached pdf). Is there another way to get the colorbar colors rasterized? Thanks Jody x = linspace(0,1,1000) X = outer(x,x) pcolormesh(X,cmap=get_cmap('RdBu_r',lut=32),rasterized=True) colorbar() savefig('Test.pdf',dpi=50)
On 2012年10月26日 6:00 PM, Jody Klymak wrote: > > Hi all, > > So I figured out the magic of "rasterized=True", which is *really* > helpful! > > However, the colorbar doesn't seem to accept rasterized=True, so > there are little lines every facet (zoom on the attached pdf). Is > there another way to get the colorbar colors rasterized? Try: cb = colorbar() cb.solids.set_rasterized(True) Incidentally, the lines in the pdf are an artifact of most pdf viewers, not a bug in the pdf file. It is possible that there is some way to construct the pdf files such that this does not happen, without introducing other artifacts, but we have never found one. Eric > > Thanks Jody > x = linspace(0,1,1000) > X = outer(x,x) > pcolormesh(X,cmap=get_cmap('RdBu_r',lut=32),rasterized=True) > colorbar() > savefig('Test.pdf',dpi=50) > > > > > -- > Jody Klymak > http://web.uvic.ca/~jklymak/ > > > > > > ------------------------------------------------------------------------------ > WINDOWS 8 is here. > Millions of people. Your app in 30 days. > Visit The Windows 8 Center at Sourceforge for all your go to resources. > http://windows8center.sourceforge.net/ > join-generation-app-and-make-money-coding-fast/ > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On Oct 28, 2012, at 17:47 PM, Eric Firing <ef...@ha...> wrote: > > cb = colorbar() > cb.solids.set_rasterized(True) Great! Though I think it'd have taken me a while to figure that one out! Thanks, Jody -- Jody Klymak http://web.uvic.ca/~jklymak/
On 10/29/12 1:08 PM, Jody Klymak wrote: > > On Oct 28, 2012, at 17:47 PM, Eric Firing <ef...@ha...> wrote: >> >> cb = colorbar() >> cb.solids.set_rasterized(True) > > > Great! Though I think it'd have taken me a while to figure that one out! I gotta agree. Is this (and the solids object) documented anywhere? M
On 2012年10月29日 2:00 PM, Mike Kaufman wrote: > On 10/29/12 1:08 PM, Jody Klymak wrote: >> >> On Oct 28, 2012, at 17:47 PM, Eric Firing <ef...@ha...> wrote: >>> >>> cb = colorbar() >>> cb.solids.set_rasterized(True) >> >> >> Great! Though I think it'd have taken me a while to figure that one out! > > I gotta agree. Is this (and the solids object) documented anywhere? No, and it probably won't be any time soon. Rasterization here is a last resort work-around for buggy pdf renderers. The solids object is mentioned in the colorbar docstring as something one can modify for such workarounds (an alternative is given), but perhaps without saying what kind of a thing it is. Eric > > M > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >