You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
(13) |
2
(12) |
3
(3) |
4
(13) |
5
(13) |
6
(2) |
7
(5) |
8
(17) |
9
(9) |
10
(10) |
11
(16) |
12
(8) |
13
(10) |
14
(1) |
15
(5) |
16
(5) |
17
(7) |
18
(13) |
19
(9) |
20
|
21
|
22
(2) |
23
(3) |
24
(5) |
25
(5) |
26
(14) |
27
(1) |
28
(2) |
29
(18) |
30
(5) |
31
(22) |
|
|
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I have been struggling with this all afternoon. I have a function which generates an array of arrays: y=[array([<f(x0)>]),array([<f(x1)>]),array([<f(x2)>])...] and x=array([x0,x1,x2,...]) I want to plot the family of curves y=f(x). plot(x,y[n]) where n is the nth array in y plots the correct curve, however plot(x,y) and plot(x,y[:]) complain about mismatched array dimensions. Any suggestions? Thanks, Dave - -- David D. Clark Electrical Engineer P-23, Neutron Science and Technology e-mail mailto:dd...@la... GPG Public key 0x018D6523 available at http://pgp.mit.edu http://www.gnupg.org has information about public key cryptography -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHAYQNNu7GcwGNZSMRAnKvAKCKHRigFQr7pOc1OU4uyWIPaPjQzQCcCG2c 8lWM6Nhsl/R8s21Rs3mM7v0= =Wr2j -----END PGP SIGNATURE-----
On Monday 01 October 2007 01:25:11 pm Tom Johnson wrote: > On 9/27/07, Tom Johnson <tj...@gm...> wrote: > > On 9/27/07, Darren Dale <dd...@co...> wrote: > > > On Thursday 27 September 2007 01:28:46 am Tom Johnson wrote: > > [snip] > > > > > Actually, the problem exists as early as the dvi file. > > > > > > The dvi looks fine here, and so does my pdf. > > [snip] > > > Hmm...I have: > > > > ESP Ghostscript 8.15.04 (2007年03月14日) > > pdftops version 3.01 (coming from libpoppler1 version 0.5.4-0ubuntu8) > > pdfeTeX 3.141592-1.21a-2.2 (tetex-3.0.dfsg.3-4) > > After doing some upgrades, I think I have more information about this > issue. In summary, the problem is fixed, but I think there are still > some questions as to the cause of the earlier problem. Currently, I > have: > > GPL Ghostscript 8.61 > pdftops version 3.02 > pdfTeX 3.141592-1.40.3-2.2 > > If I use the scripts in the original email, then there is no problem. > That is, with facecolor='white', the resulting eps, dvi, ps, and pdf > all have a figure with a white facecolor. > > Strangely, if I use an EPS from before my upgrades, the problem still > exists. This has the fortunate effect that I do not need to > regenerate all my images. In this situation, as described previously, > the eps file looks fine using gv (has a white facecolor). However, > the resulting dvi, ps, and pdf all have a figure with no > facecolor---and this behavior not consistent with edgecolor. > > I am using the same version of matplotlib (before and after the > upgrade)... SVN Revision 3709...and python 2.5 as well. Since the > problem still occurs with particular EPS files....the problem > definitely must be with the EPS. > > I don't know how the EPS file is constructed in matplotlib...does it > make use of external programs like gs (and thus, points the reason > back at EPS Ghostscript)? In case someone is interested in searching > for the source of the problem, I have attached: It was a problem introduced by one of the external dependencies during the distillation process, that's why your old eps files still look the way they do. It was not a problem with the viewer. It looks like the problem was fixed in a recent ghostscript release, and I don't think the matplotlib mailing lists are an appropriate forum for discussing problems with ghostscript. Darren
Lee, Young-Jin wrote: > Folks, I need your help. I'll explain a little further what happens. > Following is a test program,'test.py', and screen shot of the error > message. Here, 'test.py' is simple chart of sinusoidal function in > http://matplotlib.sourceforge.net/screenshots.html (simple_plot.py), but > have two of them in series. I tried Wolfgang's suggestion but it doesn't > help. Any idea? > > Test.py: > > from pylab import * > > t = arange(0.0, 2.0, 0.01) > s = sin(2*pi*t) > plot(t, s, linewidth=1.0) > > xlabel('time (s)') > ylabel('voltage (mV)') > title('About as simple as it gets, folks') > grid(True) > show() > > clf() > t = arange(0.0, 2.0, 0.01) > s = sin(2*pi*t) > plot(t, s, linewidth=1.0) > > xlabel('time (s)') > ylabel('voltage (mV)') > title('About as simple as it gets, folks') > grid(True) > show() > Young-Jin: You can't have two "show()"s in one script. Comment out the first one, and replace the "clf()" with "figure()" and all is well. Or, use "draw()". See http://matplotlib.sourceforge.net/faq.html#SHOW for details. -Jeff > > Execution of test.py: > > c:\Python24>python test.py > c:\Python24\lib\site-packages\matplotlib\numerix\__init__.py:53: > DeprecationWarn > ing: numarray use as a numerix backed for matplotlib is deprecated > DeprecationWarning, stacklevel=1) > Fatal Python error: PyEval_RestoreThread: NULL tstate > > This application has requested the Runtime to terminate it in an unusual > way. > Please contact the application's support team for more information. > > c:\Python24> > > -----Original Message----- > From: Wolfgang Kerzendorf [mailto:wke...@go...] > Sent: Wednesday, September 26, 2007 9:03 PM > To: Lee, Young-Jin > Cc: mat...@li... > Subject: Re: [Matplotlib-users] multiple figures interactively > > This might help you it destroys the whole window: > pylab.get_current_fig_manager().destroy() > and then you open it again with show > Lee, Young-Jin wrote: > >> Hi, >> >> I 'm writing a python program that draws figures one by one >> interactively with the user's input in dos mode. Basically, I give the >> > > >> program a decision after each figure and then it draws the next one. >> After the first figure, it got very much slowed down for the second >> one and crashed for the third one. I feel like it has some memory >> issues as I keep using 'show' after I close each. I used 'clf()' >> before I draw a new one, but it doesn't seem to help. Any idea? >> > Thanks. > >> Young Jin >> >> >> -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
On 9/27/07, Tom Johnson <tj...@gm...> wrote: > On 9/27/07, Darren Dale <dd...@co...> wrote: > > On Thursday 27 September 2007 01:28:46 am Tom Johnson wrote: [snip] > > > Actually, the problem exists as early as the dvi file. > > > > > The dvi looks fine here, and so does my pdf. [snip] > Hmm...I have: > > ESP Ghostscript 8.15.04 (2007年03月14日) > pdftops version 3.01 (coming from libpoppler1 version 0.5.4-0ubuntu8) > pdfeTeX 3.141592-1.21a-2.2 (tetex-3.0.dfsg.3-4) > After doing some upgrades, I think I have more information about this issue. In summary, the problem is fixed, but I think there are still some questions as to the cause of the earlier problem. Currently, I have: GPL Ghostscript 8.61 pdftops version 3.02 pdfTeX 3.141592-1.40.3-2.2 If I use the scripts in the original email, then there is no problem. That is, with facecolor='white', the resulting eps, dvi, ps, and pdf all have a figure with a white facecolor. Strangely, if I use an EPS from before my upgrades, the problem still exists. This has the fortunate effect that I do not need to regenerate all my images. In this situation, as described previously, the eps file looks fine using gv (has a white facecolor). However, the resulting dvi, ps, and pdf all have a figure with no facecolor---and this behavior not consistent with edgecolor. I am using the same version of matplotlib (before and after the upgrade)... SVN Revision 3709...and python 2.5 as well. Since the problem still occurs with particular EPS files....the problem definitely must be with the EPS. I don't know how the EPS file is constructed in matplotlib...does it make use of external programs like gs (and thus, points the reason back at EPS Ghostscript)? In case someone is interested in searching for the source of the problem, I have attached: 1) good.eps (which has a white facecolor when included in a document) 2) bad eps (which has no facecolor when included in a document) 3) test.pdf (a demonstration of both images in one document) 4) test.tex (the source for test.pdf) Thanks!
David Loyall wrote: > On 10/1/07, Michael Droettboom <md...@st...> wrote: >> We can first try to track down whether the Arial MS Unicode font is >> getting picked up. In your matplotlibrc, can you add: >> >> verbose: debug-annoying > > Michael, > > Thank you. Interesting results: > > With verbose.level set to debug-annoying, these lines look significant: > findfont failed Arial Unicode MS, normal, normal 500, normal, 14.0 > Could not match Arial Unicode MS, normal, normal. Returning > /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf > > Well, I played around with this a little more and found the problem! > The font.weight of 'medium' (500) is what could not be found. When I > switched font.weight to 'normal' (400) in matplotlibrc, it worked and > the graph was rendered with the correct glyph. (This worked for the > DejaVu Sans font, still no luck with Arial Unicode MS, but, that's > fine.) > > So, problem solved, thanks again! :) Great to know the problem is solved in your particular instance. In general, though, the font-finding algorithm is being a bit too strict. Currently there's no sense of "weighting of properties" in the way it looks up fonts -- it should probably do something to the effect that a match of the name is more important than a match in the weight. As it stands now, if it doesn't find an exact match it throws up its hands and just grabs the first available font... There is some experimental support for using fontconfig (the more-or-less standard way to look up fonts on Linux these days) in SVN of matplotlib -- hopefully by the next release some of these things will be worked out. > Here's something I noticed: When I copied ARIALUNI.TTF into > /usr/share/matplotlib/mpl-data/fonts/ttf/ and ran the test plot, all > the characters are gibberish. Actually, they are glyphs, but, the > wrong ones. The same thing happens if I copy Thyromanes .ttf files > into that directory, or if I put those files in the $TTFPATH > directory. In fact, it also happens if I copy andalemo.ttf, and that > font doesn't include extra unicode characters. > > So, I'll paste the entire debug-annoying output that occurred when I > was getting the gibberish text on the plot at the end of this email. > As you can see, I set the font to a nonsense string to illustrate that > the problem occurs even if the extra font in the directory isn't being > requested. Also, I made sure that the extra font wasn't duplicated > anywhere else in the search path. The problem is in this line: /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf That's Computer Modern "Extra Symbols" which is mainly comprised of characters for composing math equations -- there's no "letters" in there at all. When matplotlib doesn't find an exact match for a font, it's supposed to default to Vera Sans. In all your experimentation, did you perhaps delete the Vera Sans that comes with matplotlib? (It doesn't look like it was in the search path.) Restoring that file should at least remove the "gibberish" problem, but you still won't get the fonts you want. You'll (unfortunately) have to do like you did with Arial Unicode and set all the parameters correctly. (You may need to delete your font cache in ~/.matplotlib/ttffont.cache as well.) Cheers, Mike > loaded rc file /home/hobbes/.matplotlib/matplotlibrc > matplotlib version 0.90.1 > verbose.level debug-annoying > interactive is False > units is False > platform is linux2 > loaded modules: ['_bisect', 'distutils', 'pylab', 'datetime', > 'matplotlib.tempfile', 'distutils.sysconfig', 'pytz.datetime', > 'pytz.cStringIO', 'struct', 'tempfile', 'imp', 'pytz.os', 'zipimport', > 'string', 'encodings.utf_8', 'matplotlib.__future__', 'pytz.tzinfo', > 'distutils.re', 'bisect', 'signal', 'random', 'token', > 'matplotlib.pytz', 'dis', 'pytz.tzfile', 'cStringIO', 'locale', > 'encodings', 'dateutil', 'matplotlib.warnings', 'pytz.pytz', > 'matplotlib.sys', 're', 'math', 'fcntl', 'UserDict', 'inspect', > 'distutils.os', 'matplotlib', 'codecs', 'md5', '_locale', > 'matplotlib.os', 'thread', 'sre', 'itertools', 'opcode', > 'distutils.sys', 'os', '__future__', '_sre', '__builtin__', > 'matplotlib.re', 'distutils.string', 'matplotlib.datetime', > 'posixpath', 'errno', 'binascii', 'sre_constants', 'matplotlib.md5', > 'types', 'pytz.sys', 'tokenize', '_codecs', 'pytz', 'copy', > 'matplotlib.dateutil', 'posix', 'encodings.aliases', 'exceptions', > 'sre_parse', 'pytz.bisect', 'copy_reg', 'sre_compile', '_random', > 'pytz.struct', 'site', '__main__', 'shutil', 'strop', > 'encodings.codecs', 'gettext', 'encodings.exceptions', 'pytz.sets', > 'stat', 'warnings', 'encodings.types', 'sys', 'os.path', > 'pytz.gettext', 'matplotlib.distutils', 'distutils.errors', > 'linecache', 'matplotlib.shutil', 'sets'] > numerix numpy 1.0.3 > font search path ['/usr/share/matplotlib/mpl-data/fonts/ttf', > '/usr/share/matplotlib/mpl-data/fonts/afm'] > trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf > trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmr10.ttf > trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmmi10.ttf > trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmsy10.ttf > trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmtt10.ttf > trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/ARIALUNI.TTF > trying fontname /usr/share/fonts/truetype/ttf-sil-padauk/Padauk-Bold.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/verdanai.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeSerif.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf > trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevG.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaBrightRegular.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Georgia_Bold.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeSerifBold.ttf > trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevE.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/georgiab.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeSansOblique.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Georgia_Bold_Italic.ttf > trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevC.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaBrightDemiItalic.ttf > trying fontname > /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Italic.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Impact.ttf > trying fontname > /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-BoldOblique.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Georgia.ttf > trying fontname > /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Bold.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/andalemo.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/arialbi.ttf > trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevB.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaSansOblique.ttf > trying fontname /usr/share/fonts/truetype/ttf-junicode/Junicode-Bold.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Verdana.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf > trying fontname > /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Oblique.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/cour.ttf > trying fontname > /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterBoldOblique.ttf > trying fontname /usr/share/fonts/truetype/ttf-thryomanes/thryrg__.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldItalic.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/courbd.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf > trying fontname /usr/share/fonts/truetype/ttf-thryomanes/thrybi__.ttf > trying fontname > /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-Bold.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Italic.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/comicbd.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Arial.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaBrightItalic.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/courbi.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/times.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/georgia.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/trebuc.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeSansBold.ttf > trying fontname > /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-BoldOblique.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-ExtraLight.ttf > trying fontname /usr/share/fonts/truetype/ttf-junicode/Junicode-Regular.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/verdanaz.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/georgiai.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Andale_Mono.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaSansRegular.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Georgia_Italic.ttf > trying fontname /usr/share/fonts/truetype/kochi/kochi-mincho.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/couri.ttf > trying fontname > /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-BoldItalic.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/ariblk.ttf > trying fontname /usr/share/fonts/truetype/openoffice/opens___.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf > trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevD.ttf > trying fontname > /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-Italic.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Arial_Black.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Webdings.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterOblique.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf > trying fontname /usr/share/fonts/truetype/ttf-sil-padauk/Padauk.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeMonoBoldOblique.ttf > trying fontname /usr/share/fonts/truetype/ttf-junicode/Junicode-Italic.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeSans.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/ariali.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeSerifBoldItalic.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/trebucbi.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterBold.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/timesi.ttf > trying fontname > /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaBrightDemiBold.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/georgiaz.ttf > trying fontname > /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf > trying fontname /usr/share/fonts/truetype/ttf-thryomanes/thryb___.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/timesbd.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/verdana.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/arial.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeMonoOblique.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/comic.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/webdings.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/trebucit.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/timesbi.ttf > trying fontname /usr/share/fonts/truetype/ttf-thryomanes/thryi___.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf > trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/impact.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/verdanab.ttf > trying fontname > /usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold_Italic.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaSansDemiOblique.ttf > trying fontname /usr/share/fonts/truetype/kochi/kochi-mincho-subst.ttf > trying fontname /usr/share/fonts/truetype/ttf-junicode/Junicode-BoldItalic.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeMono.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/trebucbd.ttf > trying fontname /usr/share/fonts/truetype/freefont/FreeSerifItalic.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterRegular.ttf > trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaSansDemiBold.ttf > trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevA.ttf > trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevF.ttf > trying fontname /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf > $HOME=/home/hobbes > CONFIGDIR=/home/hobbes/.matplotlib > loaded ttfcache file /home/hobbes/.matplotlib/ttffont.cache > matplotlib data path /usr/share/matplotlib/mpl-data > Could not load matplotlib icon: Couldn't recognize the image file > format for file '/usr/share/matplotlib/mpl-data/images/matplotlib.svg' > backend GTKAgg version 2.10.6 > FigureCanvasAgg.draw > RendererAgg.__init__ > RendererAgg.__init__ width=640.0, height=480.0 > RendererAgg.__init__ _RendererAgg done > RendererAgg.__init__ done > RendererAgg._get_agg_font > findfont failed FOOFOOFOO > Could not match FOOFOOFOO, normal, normal. Returning > /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > findfont failed FOOFOOFOO, normal, normal 400, normal, 14.0 > Could not match FOOFOOFOO, normal, normal. Returning > /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > FigureCanvasAgg.buffer_rgba > RendererAgg.buffer_rgba -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
On 10/1/07, Michael Droettboom <md...@st...> wrote: > We can first try to track down whether the Arial MS Unicode font is > getting picked up. In your matplotlibrc, can you add: > > verbose: debug-annoying Michael, Thank you. Interesting results: With verbose.level set to debug-annoying, these lines look significant: findfont failed Arial Unicode MS, normal, normal 500, normal, 14.0 Could not match Arial Unicode MS, normal, normal. Returning /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf Well, I played around with this a little more and found the problem! The font.weight of 'medium' (500) is what could not be found. When I switched font.weight to 'normal' (400) in matplotlibrc, it worked and the graph was rendered with the correct glyph. (This worked for the DejaVu Sans font, still no luck with Arial Unicode MS, but, that's fine.) So, problem solved, thanks again! :) Here's something I noticed: When I copied ARIALUNI.TTF into /usr/share/matplotlib/mpl-data/fonts/ttf/ and ran the test plot, all the characters are gibberish. Actually, they are glyphs, but, the wrong ones. The same thing happens if I copy Thyromanes .ttf files into that directory, or if I put those files in the $TTFPATH directory. In fact, it also happens if I copy andalemo.ttf, and that font doesn't include extra unicode characters. So, I'll paste the entire debug-annoying output that occurred when I was getting the gibberish text on the plot at the end of this email. As you can see, I set the font to a nonsense string to illustrate that the problem occurs even if the extra font in the directory isn't being requested. Also, I made sure that the extra font wasn't duplicated anywhere else in the search path. Cheers, --Dave Loyall loaded rc file /home/hobbes/.matplotlib/matplotlibrc matplotlib version 0.90.1 verbose.level debug-annoying interactive is False units is False platform is linux2 loaded modules: ['_bisect', 'distutils', 'pylab', 'datetime', 'matplotlib.tempfile', 'distutils.sysconfig', 'pytz.datetime', 'pytz.cStringIO', 'struct', 'tempfile', 'imp', 'pytz.os', 'zipimport', 'string', 'encodings.utf_8', 'matplotlib.__future__', 'pytz.tzinfo', 'distutils.re', 'bisect', 'signal', 'random', 'token', 'matplotlib.pytz', 'dis', 'pytz.tzfile', 'cStringIO', 'locale', 'encodings', 'dateutil', 'matplotlib.warnings', 'pytz.pytz', 'matplotlib.sys', 're', 'math', 'fcntl', 'UserDict', 'inspect', 'distutils.os', 'matplotlib', 'codecs', 'md5', '_locale', 'matplotlib.os', 'thread', 'sre', 'itertools', 'opcode', 'distutils.sys', 'os', '__future__', '_sre', '__builtin__', 'matplotlib.re', 'distutils.string', 'matplotlib.datetime', 'posixpath', 'errno', 'binascii', 'sre_constants', 'matplotlib.md5', 'types', 'pytz.sys', 'tokenize', '_codecs', 'pytz', 'copy', 'matplotlib.dateutil', 'posix', 'encodings.aliases', 'exceptions', 'sre_parse', 'pytz.bisect', 'copy_reg', 'sre_compile', '_random', 'pytz.struct', 'site', '__main__', 'shutil', 'strop', 'encodings.codecs', 'gettext', 'encodings.exceptions', 'pytz.sets', 'stat', 'warnings', 'encodings.types', 'sys', 'os.path', 'pytz.gettext', 'matplotlib.distutils', 'distutils.errors', 'linecache', 'matplotlib.shutil', 'sets'] numerix numpy 1.0.3 font search path ['/usr/share/matplotlib/mpl-data/fonts/ttf', '/usr/share/matplotlib/mpl-data/fonts/afm'] trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmr10.ttf trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmmi10.ttf trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmsy10.ttf trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmtt10.ttf trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/ARIALUNI.TTF trying fontname /usr/share/fonts/truetype/ttf-sil-padauk/Padauk-Bold.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/verdanai.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSerif.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevG.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaBrightRegular.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Georgia_Bold.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSerifBold.ttf trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevE.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/georgiab.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSansOblique.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Georgia_Bold_Italic.ttf trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevC.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaBrightDemiItalic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Italic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Impact.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-BoldOblique.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Georgia.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Bold.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/andalemo.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/arialbi.ttf trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevB.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaSansOblique.ttf trying fontname /usr/share/fonts/truetype/ttf-junicode/Junicode-Bold.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Verdana.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Oblique.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/cour.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterBoldOblique.ttf trying fontname /usr/share/fonts/truetype/ttf-thryomanes/thryrg__.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldItalic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/courbd.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf trying fontname /usr/share/fonts/truetype/ttf-thryomanes/thrybi__.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-Bold.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Italic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/comicbd.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Arial.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaBrightItalic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/courbi.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/times.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/georgia.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/trebuc.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSansBold.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-BoldOblique.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-ExtraLight.ttf trying fontname /usr/share/fonts/truetype/ttf-junicode/Junicode-Regular.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/verdanaz.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/georgiai.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Andale_Mono.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaSansRegular.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Georgia_Italic.ttf trying fontname /usr/share/fonts/truetype/kochi/kochi-mincho.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/couri.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-BoldItalic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/ariblk.ttf trying fontname /usr/share/fonts/truetype/openoffice/opens___.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevD.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-Italic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Arial_Black.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Webdings.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterOblique.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf trying fontname /usr/share/fonts/truetype/ttf-sil-padauk/Padauk.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeMonoBoldOblique.ttf trying fontname /usr/share/fonts/truetype/ttf-junicode/Junicode-Italic.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSans.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/ariali.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSerifBoldItalic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/trebucbi.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterBold.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/timesi.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaBrightDemiBold.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/georgiaz.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf trying fontname /usr/share/fonts/truetype/ttf-thryomanes/thryb___.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/timesbd.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/verdana.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/arial.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeMonoOblique.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/comic.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/webdings.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/trebucit.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/timesbi.ttf trying fontname /usr/share/fonts/truetype/ttf-thryomanes/thryi___.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/impact.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/verdanab.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold_Italic.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaSansDemiOblique.ttf trying fontname /usr/share/fonts/truetype/kochi/kochi-mincho-subst.ttf trying fontname /usr/share/fonts/truetype/ttf-junicode/Junicode-BoldItalic.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeMono.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/trebucbd.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSerifItalic.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterRegular.ttf trying fontname /usr/share/fonts/truetype/ttf-lucida/LucidaSansDemiBold.ttf trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevA.ttf trying fontname /usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevF.ttf trying fontname /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf $HOME=/home/hobbes CONFIGDIR=/home/hobbes/.matplotlib loaded ttfcache file /home/hobbes/.matplotlib/ttffont.cache matplotlib data path /usr/share/matplotlib/mpl-data Could not load matplotlib icon: Couldn't recognize the image file format for file '/usr/share/matplotlib/mpl-data/images/matplotlib.svg' backend GTKAgg version 2.10.6 FigureCanvasAgg.draw RendererAgg.__init__ RendererAgg.__init__ width=640.0, height=480.0 RendererAgg.__init__ _RendererAgg done RendererAgg.__init__ done RendererAgg._get_agg_font findfont failed FOOFOOFOO Could not match FOOFOOFOO, normal, normal. Returning /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg.points_to_pixels RendererAgg.points_to_pixels RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg.points_to_pixels RendererAgg.points_to_pixels RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg.points_to_pixels RendererAgg.points_to_pixels RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg.points_to_pixels RendererAgg.points_to_pixels RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg.points_to_pixels RendererAgg.points_to_pixels RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg.points_to_pixels RendererAgg.points_to_pixels RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg.points_to_pixels RendererAgg.points_to_pixels RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg.points_to_pixels RendererAgg.points_to_pixels RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg.points_to_pixels RendererAgg.points_to_pixels RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg.points_to_pixels RendererAgg.points_to_pixels RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font RendererAgg._get_agg_font findfont failed FOOFOOFOO, normal, normal 400, normal, 14.0 Could not match FOOFOOFOO, normal, normal. Returning /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf RendererAgg._get_agg_font RendererAgg.draw_text RendererAgg._get_agg_font FigureCanvasAgg.buffer_rgba RendererAgg.buffer_rgba
We can first try to track down whether the Arial MS Unicode font is getting picked up. In your matplotlibrc, can you add: verbose: debug-annoying and send the output of your plot to the list? You'll see where it looks up the font and whether that lookup failed or not. There have been a number of Unicode-related fixes in SVN since the 0.90.1 release -- though most were in the PDF backend, not PS. One thing to try (don't know offhand whether it's working better or not) may be to use the Cairo backend to generate the PS and then use ps2epsi to get an EPS. Cheers, Mike David Loyall wrote: > Hello. > > I've been having trouble getting Unicode characters to render. I just > get a box in the title of my figure, rather than the character I need. > > Here is my code: > #!/usr/bin/env python > from pylab import * > plot([1,2,3,4]) > title(u"\u0251") > savefig("test.eps") > savefig("test.png") > show() > > That character is LATIN SMALL LETTER ALPHA. It's used in the > International Phonetic Alphabet. > > I'm on Linux and I'm using matplotlib 0.90.1-2 (debian package > version). I have a few TTF fonts in my system that contain that > glyph. One is 'Arial Unicode MS', which I copied from my windows > machine. > > As you can see, I will need to generate an EPS that renders the > character... That EPS file will be imported into MS Word on a Windows > PC and printed. > > I will happily use any solution that allows me to use that character > in the final product... :) It doesn't have to be unicode.. > > I believe that my fonts are configured correctly on this Linux > system--I can use the Arial Unicode MS font in Open Office. However, > I'm not sure that MPL is finding them. > > When I point the TTFPATH environment variable a directory that only > contains ARIALUNI.TTF, I get gibberish for all characters in my > figure. > > When I use ~/.matplotlib/matplotlibrc to list Arial Unicode MS as the > only font in the san-serif family, I don't observe any change in the > text in the figure. > > ...I did successfully instantiate an FT2FONT object out of my > ARIALUNI.TTF file, but, I didn't know what to do with it at that > point. > > Help? > > Cheers, > --Dave Loyall > Omaha, Nebraska, USA > > ------------------------------------------------------------------------- > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
After installing matplotlib (matplotlib-0.90.1.win32-py2.5.exe) on Windows XP, the command "from pylab import *" results in an error message complaining that the file "_agg" is missing. Indeed there is no file "_agg.py" in the distribution, although a file "_agg.pyd" exists. Can anyone suggest how to solve this problem?
Hi everybody, I tried: >>> import pylab >>> pylab.plot(["a", "b", "c"], [1, 2, 3]) ValueError: invalid literal for float(): a Well, I expected that. I wrote this to just explain my trouble: printing strings instead float along x-axes (a sort of mapping floats to strings...). Writing that pylab.plot I mean that "a", "b", "c" were equalli spaced and "a" --> 1, "b" --> 2, "c" --> 3. I think it could be a reasonnable command. Is there something similar? Long searches didn't satisfy my problem. Anybody knows the solution? Thanks PS sorry for bad english -- Iacopo
Jan Strube wrote: > Sorry, reposting, because I sent it from the wrong address. > > I'm having some problems understanding the difference between > pylab.xticks() and pylab.yticks() > Consider the following: > > import pylab as P > import numpy as N > > data = N.random.random((10, 10)) > P.matshow(data) > P.xticks([0, 1, 2], ['1', '2', '3']) > P.show() > > > Why does this work, but if I change P.xticks to P.yticks, it doesn't? This is now fixed in svn 3904. The problem was not related to x versus y but was caused by incorrect handling of the reversed y axis (positive down instead of positive up). If the x axis were the reversed one, the same problem would occur. > > The error message that I get back doesn't give me any insight as to > what could cause the difference between xticks and yticks. Yes, it is one of those infamous error messages from the extension code in the transforms module. > > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/figure.py", > line 612, in draw > for a in self.axes: a.draw(renderer) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axes.py", > line 1287, in draw > self.transData.freeze() # eval the lazy objects > ValueError: Domain error on eval_scalars in Transformation::freeze It is probably a divide-by-zero error; but the real bug was elsewhere in the extension code, where the y-data-interval was erroneously set to zero when you tried to set the ticks. > > > matplotlib.__version__ > Out[2]: '0.90.1' > > I am still in the learning phase, so any insight as to what's going > on is appreciated. > > Best, > Jan Thanks for the good bug report, or more precisely, the good report of a bad bug. I dimly recall some other email recently--maybe on matplotlib-devel--that may have been related. I think it was advocating a different method of keeping track of reversed axes. Maybe it was prompted by encountering the same problem you ran into. Eric
Folks, I need your help. I'll explain a little further what happens. Following is a test program,'test.py', and screen shot of the error message. Here, 'test.py' is simple chart of sinusoidal function in http://matplotlib.sourceforge.net/screenshots.html (simple_plot.py), but have two of them in series. I tried Wolfgang's suggestion but it doesn't help. Any idea? Test.py: from pylab import * t =3D arange(0.0, 2.0, 0.01) s =3D sin(2*pi*t) plot(t, s, linewidth=3D1.0) xlabel('time (s)') ylabel('voltage (mV)') title('About as simple as it gets, folks') grid(True) show() clf() t =3D arange(0.0, 2.0, 0.01) s =3D sin(2*pi*t) plot(t, s, linewidth=3D1.0) xlabel('time (s)') ylabel('voltage (mV)') title('About as simple as it gets, folks') grid(True) show() Execution of test.py: c:\Python24>python test.py c:\Python24\lib\site-packages\matplotlib\numerix\__init__.py:53: DeprecationWarn ing: numarray use as a numerix backed for matplotlib is deprecated DeprecationWarning, stacklevel=3D1) Fatal Python error: PyEval_RestoreThread: NULL tstate This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. c:\Python24> -----Original Message----- From: Wolfgang Kerzendorf [mailto:wke...@go...]=20 Sent: Wednesday, September 26, 2007 9:03 PM To: Lee, Young-Jin Cc: mat...@li... Subject: Re: [Matplotlib-users] multiple figures interactively This might help you it destroys the whole window: pylab.get_current_fig_manager().destroy() and then you open it again with show Lee, Young-Jin wrote: > > Hi, > > I 'm writing a python program that draws figures one by one=20 > interactively with the user's input in dos mode. Basically, I give the > program a decision after each figure and then it draws the next one.=20 > After the first figure, it got very much slowed down for the second=20 > one and crashed for the third one. I feel like it has some memory=20 > issues as I keep using 'show' after I close each. I used 'clf()'=20 > before I draw a new one, but it doesn't seem to help. Any idea? Thanks. > > Young Jin > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ - > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > =20
It appears that IndexFormatter is no longer in ticker.py as the user guide (Table 6.3, p.58) suggests. Cheers, Jan
Sorry, reposting, because I sent it from the wrong address. > I'm having some problems understanding the difference between pylab.xticks() > and pylab.yticks() > Consider the following: > > > import pylab as P > > import numpy as N > > > > data = N.random.random((10, 10)) > > P.matshow(data) > > P.xticks([0, 1, 2], ['1', '2', '3']) > > P.show() > > > Why does this work, but if I change P.xticks to P.yticks, it doesn't? > > The error message that I get back doesn't give me any insight as to what > could cause the difference between xticks and yticks. > > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/figure.py", > line 612, in draw > for a in self.axes: a.draw(renderer) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axes.py", > line 1287, in draw > self.transData.freeze() # eval the lazy objects > ValueError: Domain error on eval_scalars in Transformation::freeze > > > matplotlib.__version__ > Out[2]: '0.90.1' > > I am still in the learning phase, so any insight as to what's going on is > appreciated. > > Best, > Jan > > -- Jan Strube -- University of Oregon Stanford Linear Accelerator Center Bldg. 48 phone: (650) 926-2913