Re: [matplotlib-devel] savefig and Text.get_window_extent()

2008-09-16 Thread John Hunter
On Tue, Sep 16, 2008 at 9:00 PM, John Hunter <[EMAIL PROTECTED]> wrote: > Oops, wait, I answered too fast. The figure.dpi *was* already used in > the cache key and the renderer.dpi, which I just added, is not > guaranteed to exist (depending on the backend). I need to figure out > why the figur

Re: [matplotlib-devel] savefig and Text.get_window_extent()

2008-09-16 Thread Eric Firing
John Hunter wrote: > On Tue, Sep 16, 2008 at 8:57 PM, John Hunter <[EMAIL PROTECTED]> wrote: >> On Tue, Sep 16, 2008 at 5:09 PM, Eric Firing <[EMAIL PROTECTED]> wrote: >> >>> I find this very confusing--the _renderer.dpi is not being used by >>> get_window_extent(). Is this the intended behavior?

Re: [matplotlib-devel] savefig and Text.get_window_extent()

2008-09-16 Thread John Hunter
On Tue, Sep 16, 2008 at 8:57 PM, John Hunter <[EMAIL PROTECTED]> wrote: > On Tue, Sep 16, 2008 at 5:09 PM, Eric Firing <[EMAIL PROTECTED]> wrote: > >> I find this very confusing--the _renderer.dpi is not being used by >> get_window_extent(). Is this the intended behavior? If so, I would >> like t

Re: [matplotlib-devel] savefig and Text.get_window_extent()

2008-09-16 Thread John Hunter
On Tue, Sep 16, 2008 at 5:09 PM, Eric Firing <[EMAIL PROTECTED]> wrote: > I find this very confusing--the _renderer.dpi is not being used by > get_window_extent(). Is this the intended behavior? If so, I would > like to at least add a note to that effect to the get_window_extent > docstring No,

[matplotlib-devel] savefig and Text.get_window_extent()

2008-09-16 Thread Eric Firing
dpi settings are still a source of confusion. Suppose one wants to get the bounding boxes of strings in a png file, for use as clickable regions on a web site. Just use the get_window_extent() method of each text object after it has been drawn with savefig, right? Wrong! The gotcha is that g