I have overridden the size handler (_onSize) of FigureCanvasWxAgg. In there I 
essentially added a few lines to set the DPI value with respect to the current 
canvas size in order to resize elements as suggested by John (using 
figure.dpi.set). At a first glance everything works as expected. However, if 
the canvas becomes too small (and apparently with some font types only) I get 
the following runtime error: "Could not convert glyph to bitmap". Where is the 
problem?

Jürgen


-------- Original-Nachricht --------
> Datum: Mon, 14 Jan 2008 18:24:11 -0500
> Von: Michael Droettboom <[EMAIL PROTECTED]>
> An: John Hunter <[EMAIL PROTECTED]>
> CC: DaFudl <[EMAIL PROTECTED]>, matplotlib-users@lists.sourceforge.net
> Betreff: Re: [Matplotlib-users] re sizing behaviour like in Mircrocal Origin

> Doh!  Why didn't I think of that?
> 
> Mike
> 
> John Hunter wrote:
> > On Jan 14, 2008 3:55 PM, Michael Droettboom <[EMAIL PROTECTED]> wrote:
> > 
> >> I think what you're asking for would require a pretty major overhaul of
> >> matplotlib.  The fact that all the text etc. remains the same size is a
> > 
> > matplotlib is designed to scale in the way Jurgen requests with DPI
> > (eg fonts, line thicknesses and the like scale with DPI).
> > 
> > In [65]: fig = figure()
> > 
> > In [66]: plot([1,2,3])
> > Out[66]: [<matplotlib.lines.Line2D instance at 0xbf965ec>]
> > 
> > In [67]: fig.dpi.set(200)
> > 
> > In [68]: fig.canvas.draw()
> > 
> > with a little work, one could hook into the resize mechanism to
> > increase the dpi to create the desired effect w/o a major overhaul.
> > By default what happens is the width and height in inches are changed
> > with a resize but the dpi is held constant.  One could trick
> > matplotlib by computing a new width, height in inches, and a new dpi
> > so that the resized canvas width in pixels is the requested size based
> > on the resize event but the dpi is increased to create the microcal
> > effect
> > 
> > JDH
> 
> -- 
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to