This seem to be a recurring problem but I haven't found the answer to my problem by googling.
I am packaging an application that uses python 2.5 (from python.org) , ansi version of wxpython
(version >= 2.6) and numpy 1.01, all this on windows.
When I run my program, it complains that it can't find wxmsw26uh_vc.dll but it will run perfectly,
which I find quite surprising.
I traced the program with dlldpends, and it turns out that it stems from the wx backend: _wxagg.pyd
depends on wxmsw26uh_vc.dll
I did not develop the application, I am only trying to package it and trying to understand the
dependencies. The app runs with various versions of wxPython, but only in ansi.
The problem really arises when I try to package the applicaiton with py2exe. Py2exe won't let me do
it. I have tried --dll-excludes and --excludes without success.
import matplotlib.font_manager
fm = matplotlib.font_manager.FontManager()
If fm.ttfdict doesn't list a bunch of TrueType fonts that you think
should be listed, delete ~/.matplotlib/ttffont.cache , which will cause
it to be rebuilt the next time you import matplotlib.
Then try:
import matplotlib.text
t = matplotlib.text.Text( 'alskdjfalksdj' )
t.get_fontname()
p = t.get_font_properties()
p.get_name()
If this last statement returns the first element of
matplotlib.rcParams[ 'font.sans-serif' ]
then I would think that everything is working like it ought to.
If you get something like 'vera' at some point, then the absolute-last
fallback font is being used (fm.defaultFont).
Contrary to the comments in the default matplotlibrc, it seems that
font.size does not set the fontsize for axis labels and ticks; you have
to set [xy]tick.labelsize and axes.labelsize explicitly. But I haven't
had a chance to look into that ... yet.
hope that helps.
Glen
···
On Fri, Jan 05, 2007 at 12:21:04PM -0500, chris@...1388... wrote:
In my code I did family="sans-serif" but it didn't seem to have
any effect. Any ideas?
If this last statement returns the first element of
matplotlib.rcParams[ 'font.sans-serif' ]
then I would think that everything is working like it ought to.
fallback font is being used (fm.defaultFont).
Thanks. This caught it. I needed to install a bunch more True Type fonts as I
had too little on my system.
Contrary to the comments in the default matplotlibrc, it seems that
font.size does not set the fontsize for axis labels and ticks; you have
to set [xy]tick.labelsize and axes.labelsize explicitly.
What worked for me was adding fontsize=FONT_SIZE keyword setting
in EVERY command that involved text.
Chris
···
On Fri, Jan 05, 2007 at 04:23:53PM -0600, Glen W. Mabey wrote:
does fontweight = "..." work for you? I couldn't get that one to work
cs
···
On Fri, Jan 05, 2007 at 04:23:53PM -0600, Glen W. Mabey wrote:
Contrary to the comments in the default matplotlibrc, it seems that
font.size does not set the fontsize for axis labels and ticks; you have
to set [xy]tick.labelsize and axes.labelsize explicitly. But I haven't
had a chance to look into that ... yet.