|
From: Eric B. <eri...@gm...> - 2009-03-24 20:58:20
|
>> 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. I applied your patch, and it does allow the PDF backend to produced mixed modes at various DPI. The SVG backend complains about the change in call signature to MixedModeRenderer.__init__(). SVG is the only other backend to use MixedModeRenderer, so that would be an easy fix. It seems surprising that dpi=72 is part of the renderer assumptions somewhere along the way. >From a design perspective, is it appropriate for the renderer to store a reference to a figure? Many (all?) of the renderers seem entirely decoupled from the figure. -Eric -Eric |