SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] Misleading installation instructions in INSTALL file

From: Michael D. <md...@st...> - 2007年12月03日 13:37:14
Mario Oschwald wrote:
> Hello,
> 
> first let me thank you for your excellent software - I think
> it is just wonderful and very pleasant to use.
> 
> Two small things came up when I installed 0.91.1 into
> my home directory (I didn't want to mess with the debian
> packages since they are usually very fast in updating them)
> 
> This passage in the INSTALL file is misleading:
> 
> Note that if you install matplotlib anywhere other than the default
> location, you will need to set the MATPLOTLIBDATA environment
> variable to point to the install base dir.
> 
> 
> Instead of setting MATPLOTLIBDATA to the base dir I specified
> with setup.py install --prefix /home/mo/mpl I had to set
> it to
> 
> /home/mo/mpl/lib/python2.4/site-packages/matplotlib/mpl-data/
> 
> for mathtext to find its fonts.
Was that necessary? I routinely install matplotlib to a non-standard 
location, and have never set MATPLOTLIBDATA. If MATPLOTLIBDATA is not 
set, it appears that matplotlib will look for the "mpl-data" directory 
underneath the main matplotlib directory. (Which in your case is 
/home/mo/mpl/lib/python2.4/site-packages/matplotlib/). I'm curious if 
you get errors without specifying MATPLOTLIBDATA, and what the error is. 
 Perhaps the INSTALL docs should be updated to clarify that you only 
need this if you install the data in a non-standard place *relative to* 
the source code...
> Secondly this passage in matplotlib/mathtext.py
> 
> 544 if cached_font is None:
> 545 try:
> 546 font = FT2Font(basename)
> 547 except RuntimeError:
> 548 return None
The intent of this code is "if the font isn't found, use a dummy 
character." Since there are so many different font configurations, and 
they're all a little brittle, I thought it better to warn and fail 
gracefully than to fail completely (and users can always use the "-We" 
to fail on warnings.) Otherwise, we run the risk of having some plots 
not working on all installations (because of font limitations, etc.)
However, the implementation isn't quite right because not all callers 
expect and deal with the 'None' result correctly. I have fixed this in 
-r4557. Can you please send a script that triggers this error, so I can 
ensure my patch corrects for it?
Cheers,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /