s

On Nov 15, 2007 10:42 PM, C M <[EMAIL PROTECTED]> wrote:
> sorry, the last email did not get the pic attached.  retrying, and text
> recopied below:
> ----------------------------------------------
>
> Using Python 2.5, wxPython 2.8.4.2 (msw-unicode) matplotlib 0.90.1
>  on winXP.  I have two questions:
>
>  1) I have a small working app that produces a matplotlib plot.
>  This is a plot embedded in wxPython (it's not using Pylab).
> When it is run as a python script, it looks fine.  However, after
> packaging it into an .exe with py2exe (using GUI2Exe to do that),
> the font and size of the axes are different:  smaller, and now in
> italics. See attached picture.  I also get the errors:
>
> C:\mycode\dist\myapp.exe\matplotlib\__init__.py:948: UserWarning: Could not
> find matplotlibrc; using defaults
> C:\mycode\dist\myapp.exe\matplotlib\__init__.py:999: UserWarning: could not
> find rc file; returning defaults
>
>  I did include in the data files this folder:
>  C:\Python25\Lib\site-packages\matplotlib\mpl-data\back.png
>
>  and in the Python packages I included:
>  pytz
>  matplotlib.numerix
>
>  2) I thought that was the only error, but now I also see that, in
>  either case (as a python script or as a .exe file), each time I
>  resize the window, and the plot resizes (it is in a wxPython
>  sizer), the color of the data line changes randomly!  It starts
>  blue, and then as I resize it it can be green, red, whatever.
>  In the picture attached, with resizing they've wound up different
>  colors, though they both started blue as they should have.

My guess is that you are calling plot in an event handler that is
triggered by a resize, and are seeing mpl's color cycler.  As for the
fonts, it looks like whatever fonts are being picked up by default
(outside of py2exe) are not being packaged by py2exe.  Make sure all
the fonts in site-pacakges/matplotlib/mpl-data are being picked up by
py2exe.  In general, as long as py2exe is picking up all of mpl-data,
I don't see why you would have trouble with fonts, your rc file, or
your icons (eg back.png).  Of course, w/o seeing any code or setup
files this is just a wild guess.

JDH

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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