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
(1) |
2
(10) |
3
(29) |
4
(56) |
5
(44) |
6
(26) |
7
(12) |
8
(1) |
9
(2) |
10
(11) |
11
(28) |
12
(17) |
13
(6) |
14
(17) |
15
(7) |
16
(1) |
17
(8) |
18
(8) |
19
(7) |
20
(2) |
21
(8) |
22
(4) |
23
(6) |
24
(1) |
25
(2) |
26
(8) |
27
(3) |
28
(5) |
29
(1) |
30
|
31
(1) |
|
|
|
|
|
Jeff - Yes! I'm working on implementing this now for my app... FYI, I got the following error: TypeError: drawmapboundary() got an unexpected keyword argument 'fill_color' and again for 'lake_color' on the fillcontinents() method. I'm using 0.9.7, which I think is the latest released version... --Mike On Dec 14, 2007, at 1:31 PM, Jeff Whitaker wrote: > from matplotlib.toolkits.basemap import Basemap > import pylab > fig = pylab.figure() > ax1 = fig.add_axes([0.1,0.1,0.8,0.8]) > m = Basemap(ax=ax1) > m.drawcoastlines(linewidth=0.5) > m.fillcontinents() > ax2 = fig.add_axes([0.1,0.425,0.15,0.15]) > m2 = Basemap(projection='ortho',lon_0=-105,lat_0=40,ax=ax2) > m2.drawmapboundary(fill_color='aqua') > m2.drawcoastlines(linewidth=0.1) > m2.fillcontinents(color='coral',lake_color='aqua') > pylab.show() ------------------------------------------------------ Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ------------------------------------------------------
Michael Hearne wrote: > Jeff - Yes, that's what I want, thanks. > > I think more explanation is in order - my large-scale map is the > default basemap projection. The inset map of the globe is a > orthogonal projection, which means it comes out as a little circle. I > want to insert this smaller map into the larger one, without having to > see the area around the circle. > > I'm having trouble explaining this... here's an example: > http://earthquake.usgs.gov/eqcenter/pager/us/2007kwau/us/1/onePAGER.pdf > > I want to replicate the little inset globe on the map with the contours. > > --Mike Mike: Something like this? from matplotlib.toolkits.basemap import Basemap import pylab fig = pylab.figure() ax1 = fig.add_axes([0.1,0.1,0.8,0.8]) m = Basemap(ax=ax1) m.drawcoastlines(linewidth=0.5) m.fillcontinents() ax2 = fig.add_axes([0.1,0.425,0.15,0.15]) m2 = Basemap(projection='ortho',lon_0=-105,lat_0=40,ax=ax2) m2.drawmapboundary(fill_color='aqua') m2.drawcoastlines(linewidth=0.1) m2.fillcontinents(color='coral',lake_color='aqua') pylab.show() -Jeff -- 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
Jeff - Yes, that's what I want, thanks. I think more explanation is in order - my large-scale map is the default basemap projection. The inset map of the globe is a orthogonal projection, which means it comes out as a little circle. I want to insert this smaller map into the larger one, without having to see the area around the circle. I'm having trouble explaining this... here's an example: http://earthquake.usgs.gov/eqcenter/pager/us/2007kwau/us/1/onePAGER.pdf I want to replicate the little inset globe on the map with the contours. --Mike On Dec 14, 2007, at 12:49 PM, Jeff Whitaker wrote: > Michael Hearne wrote: >> Jeff - Darn it. So is there a way to embed an axis _inside_ >> another, possibly with a transparent background? >> >> --Mike > > > Mike: Not quite sure why you need to have it transparent - you > definitely can't have that with postscript, but it should be > possible with the other backends (png, pdf or svg). There's an > example of embedded axes at http://matplotlib.sourceforge.net/ > screenshots.html (axes_demo.py). The inset axes is just drawn on > top of the primary axes in the same figure. Is that what you want? > > -Jeff > >> On Dec 14, 2007, at 12:28 PM, Jeff Whitaker wrote: >> >>> Michael Hearne wrote: >>>> I am using Basemap, and trying to create two maps: >>>> >>>> One large-scale map, and a small-scale inset map of the world >>>> centered on the location of the large-scale map. My ultimate >>>> goal is to create a figure where the inset map is inserted into >>>> a corner of the large-scale map. I can see two ways of doing this: >>>> >>>> 1) Create both as encapsulated postscript images separately, and >>>> put them together in a later "compositing" process. (I'm doing >>>> this already). >>>> 2) Create both as basemap instances, and then draw the smaller >>>> one on top of the large-scale one. I have no idea how to do this. >>>> >>>> A problem I have encountered with the first method is that my >>>> image background is set to white by default. I've tried to make >>>> it transparent by doing the following: >>>> >>>> fig = figure(figsize=(5,5),frameon=False) #turn the frame off >>>> completely >>>> fig.figurePatch.set_alpha(0.0) #tried setting this to 1.0 and >>>> 0.0, neither works >>>> >>>> Method #2 would be cleaner, if I could do what I wanted to do in >>>> terms of transparencies, but if not, I'll take method #1. >>>> >>>> Does anyone know if it is possible to set the image background >>>> transparent for encapsulated postscript output? >>>> >>>> Thanks, >>>> >>>> Mike >>> >>> Mike: Postscript doesn't support alpha transparency. It might >>> work with PDF though. >>> >>> -Jeff >>> >>> -- >>> Jeffrey S. Whitaker Phone : (303)497-6313 >>> Meteorologist FAX : (303)497-6449 >>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no... >>> <mailto:Jef...@no...> >>> 325 Broadway Office : Skaggs Research Cntr 1D-124 >>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg >> >> >> >> >> ------------------------------------------------------ >> Michael Hearne >> mh...@us... <mailto:mh...@us...> >> (303) 273-8620 >> USGS National Earthquake Information Center >> 1711 Illinois St. Golden CO 80401 >> Senior Software Engineer >> Synergetics, Inc. >> ------------------------------------------------------ >> >> > > > -- > 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 ------------------------------------------------------ Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ------------------------------------------------------
Michael Hearne wrote: > Jeff - Darn it. So is there a way to embed an axis _inside_ another, > possibly with a transparent background? > > --Mike Mike: Not quite sure why you need to have it transparent - you definitely can't have that with postscript, but it should be possible with the other backends (png, pdf or svg). There's an example of embedded axes at http://matplotlib.sourceforge.net/screenshots.html (axes_demo.py). The inset axes is just drawn on top of the primary axes in the same figure. Is that what you want? -Jeff > On Dec 14, 2007, at 12:28 PM, Jeff Whitaker wrote: > >> Michael Hearne wrote: >>> I am using Basemap, and trying to create two maps: >>> >>> One large-scale map, and a small-scale inset map of the world >>> centered on the location of the large-scale map. My ultimate goal >>> is to create a figure where the inset map is inserted into a corner >>> of the large-scale map. I can see two ways of doing this: >>> >>> 1) Create both as encapsulated postscript images separately, and put >>> them together in a later "compositing" process. (I'm doing this >>> already). >>> 2) Create both as basemap instances, and then draw the smaller one >>> on top of the large-scale one. I have no idea how to do this. >>> >>> A problem I have encountered with the first method is that my image >>> background is set to white by default. I've tried to make it >>> transparent by doing the following: >>> >>> fig = figure(figsize=(5,5),frameon=False) #turn the frame off completely >>> fig.figurePatch.set_alpha(0.0) #tried setting this to 1.0 and 0.0, >>> neither works >>> >>> Method #2 would be cleaner, if I could do what I wanted to do in >>> terms of transparencies, but if not, I'll take method #1. >>> >>> Does anyone know if it is possible to set the image background >>> transparent for encapsulated postscript output? >>> >>> Thanks, >>> >>> Mike >>> >> >> Mike: Postscript doesn't support alpha transparency. It might work >> with PDF though. >> >> -Jeff >> >> -- >> Jeffrey S. Whitaker Phone : (303)497-6313 >> Meteorologist FAX : (303)497-6449 >> NOAA/OAR/PSD R/PSD1 Email : Jef...@no... >> <mailto:Jef...@no...> >> 325 Broadway Office : Skaggs Research Cntr 1D-124 >> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg > > > > > ------------------------------------------------------ > Michael Hearne > mh...@us... <mailto:mh...@us...> > (303) 273-8620 > USGS National Earthquake Information Center > 1711 Illinois St. Golden CO 80401 > Senior Software Engineer > Synergetics, Inc. > ------------------------------------------------------ > > -- 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
Michael Hearne wrote: > I am using Basemap, and trying to create two maps: > > One large-scale map, and a small-scale inset map of the world centered > on the location of the large-scale map. My ultimate goal is to create > a figure where the inset map is inserted into a corner of the > large-scale map. I can see two ways of doing this: > > 1) Create both as encapsulated postscript images separately, and put > them together in a later "compositing" process. (I'm doing this already). > 2) Create both as basemap instances, and then draw the smaller one on > top of the large-scale one. I have no idea how to do this. > > A problem I have encountered with the first method is that my image > background is set to white by default. I've tried to make it > transparent by doing the following: > > fig = figure(figsize=(5,5),frameon=False) #turn the frame off completely > fig.figurePatch.set_alpha(0.0) #tried setting this to 1.0 and 0.0, > neither works > > Method #2 would be cleaner, if I could do what I wanted to do in terms > of transparencies, but if not, I'll take method #1. > > Does anyone know if it is possible to set the image background > transparent for encapsulated postscript output? > > Thanks, > > Mike > > Mike: Postscript doesn't support alpha transparency. It might work with PDF though. -Jeff -- 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
I am using Basemap, and trying to create two maps: One large-scale map, and a small-scale inset map of the world centered on the location of the large-scale map. My ultimate goal is to create a figure where the inset map is inserted into a corner of the large-scale map. I can see two ways of doing this: 1) Create both as encapsulated postscript images separately, and put them together in a later "compositing" process. (I'm doing this already). 2) Create both as basemap instances, and then draw the smaller one on top of the large-scale one. I have no idea how to do this. A problem I have encountered with the first method is that my image background is set to white by default. I've tried to make it transparent by doing the following: fig = figure(figsize=(5,5),frameon=False) #turn the frame off completely fig.figurePatch.set_alpha(0.0) #tried setting this to 1.0 and 0.0, neither works Method #2 would be cleaner, if I could do what I wanted to do in terms of transparencies, but if not, I'll take method #1. Does anyone know if it is possible to set the image background transparent for encapsulated postscript output? Thanks, Mike ------------------------------------------------------ Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ------------------------------------------------------
On Dec 13, 2007 4:01 PM, Orest Kozyar <ore...@gm...> wrote: > I've been trying to set the font properties of the plots that I've > been making with matplotlib; however, there appears to be a problem > with font rendering. For example, when I check the properties of text > on the axes, etc, the font class is set to serif; however, the font in > the plot does not appear to be serif. I ran several of the font demos > in the matplotlib examples directory, and the fonts all looked the > same (except for size). Attached is the PNG of the fonts_demo.py > output. > > The only way I was able to get serif fonts was if I call: > > rc('text', usetex=True), and even then this only changes the fonts on > the axis tick labels. xlabel, ylabel still remain sans-serif. > > I'm sure I am missing something obvious, but have read through all the > documentation available on the matplotlib website regarding fonts, and > they don't seem to indicate that I need to install anything else. > > This is Python 2.5 on Windows XP. > > Thanks, > Orest > Not sure if this is your issue but I had problems with fonts until I uncommented the RC file in the fonts section of it. Matplotlib ships with the RC commented out. The file matplotlibrc is found in the matplotlib\mpl-data folder. You can just edit it with Notepad and uncomment the lines regarding fonts and try it again.
0.90 had a number of issues where it was way too strict in what it would consider a font match -- so it may be that it is rejecting Times New Roman because the numerical weight isn't an exact match, or something like that. In any case, it should be able to match against the serif font included in matplotlib -- that's still a bit of a puzzle. You can try removing your font cache file (which will force it to regenerate), which in Windows (I believe) is in c:\Documents and Settings\<user>\.matplotlib\ttffont.cache . If that doesn't work, can you send me that file (off-list) -- then I can see what fonts it thinks you have. Cheers, Mike Orest Kozyar wrote: > Hi Mike, > > It's matplotlib 0.90.1.0003, and it does not seem to matter which > backend I am using. All backends available on my machine give me a > sans-serif font, with the exception of WX, which gives me a serif > font. I've attached the debug output to this email. It looks like > findfont is failing to find the requested serif fonts so it is > returning the default font. I'm not sure why this would be the case > as I know I have Times New Roman (times.ttf) in my c:\windows\fonts > folder. > > I looked through the matplotlib docs and it says that findfont should > be able to find the fonts if they are in system default locations, so > I'm a bit stumped as to what to do now. > > Thanks! > Orest > > On Dec 14, 2007 8:16 AM, Michael Droettboom <md...@st...> wrote: >> I'm not able to reproduce this bug here (on a Linux machine). >> >> Which backend are you using? What version of matplotlib? Can you set >> the parameter "verbose.level" to "debug-annoying" and send the output to >> this list? >> >> Cheers, >> Mike >> >> >> Orest Kozyar wrote: >>> I've been trying to set the font properties of the plots that I've >>> been making with matplotlib; however, there appears to be a problem >>> with font rendering. For example, when I check the properties of text >>> on the axes, etc, the font class is set to serif; however, the font in >>> the plot does not appear to be serif. I ran several of the font demos >>> in the matplotlib examples directory, and the fonts all looked the >>> same (except for size). Attached is the PNG of the fonts_demo.py >>> output. >>> >>> The only way I was able to get serif fonts was if I call: >>> >>> rc('text', usetex=True), and even then this only changes the fonts on >>> the axis tick labels. xlabel, ylabel still remain sans-serif. >>> >>> I'm sure I am missing something obvious, but have read through all the >>> documentation available on the matplotlib website regarding fonts, and >>> they don't seem to indicate that I need to install anything else. >>> >>> This is Python 2.5 on Windows XP. >>> >>> Thanks, >>> Orest >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >>> ------------------------------------------------------------------------ >>> >>> ------------------------------------------------------------------------- >>> SF.Net email is sponsored by: >>> Check out the new SourceForge.net Marketplace. >>> It's the best place to buy or sell services >>> for just about anything Open Source. >>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> 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 >> -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
Hi Mike, It's matplotlib 0.90.1.0003, and it does not seem to matter which backend I am using. All backends available on my machine give me a sans-serif font, with the exception of WX, which gives me a serif font. I've attached the debug output to this email. It looks like findfont is failing to find the requested serif fonts so it is returning the default font. I'm not sure why this would be the case as I know I have Times New Roman (times.ttf) in my c:\windows\fonts folder. I looked through the matplotlib docs and it says that findfont should be able to find the fonts if they are in system default locations, so I'm a bit stumped as to what to do now. Thanks! Orest On Dec 14, 2007 8:16 AM, Michael Droettboom <md...@st...> wrote: > I'm not able to reproduce this bug here (on a Linux machine). > > Which backend are you using? What version of matplotlib? Can you set > the parameter "verbose.level" to "debug-annoying" and send the output to > this list? > > Cheers, > Mike > > > Orest Kozyar wrote: > > I've been trying to set the font properties of the plots that I've > > been making with matplotlib; however, there appears to be a problem > > with font rendering. For example, when I check the properties of text > > on the axes, etc, the font class is set to serif; however, the font in > > the plot does not appear to be serif. I ran several of the font demos > > in the matplotlib examples directory, and the fonts all looked the > > same (except for size). Attached is the PNG of the fonts_demo.py > > output. > > > > The only way I was able to get serif fonts was if I call: > > > > rc('text', usetex=True), and even then this only changes the fonts on > > the axis tick labels. xlabel, ylabel still remain sans-serif. > > > > I'm sure I am missing something obvious, but have read through all the > > documentation available on the matplotlib website regarding fonts, and > > they don't seem to indicate that I need to install anything else. > > > > This is Python 2.5 on Windows XP. > > > > Thanks, > > Orest > > > > > > ------------------------------------------------------------------------ > > > > > > ------------------------------------------------------------------------ > > > > ------------------------------------------------------------------------- > > SF.Net email is sponsored by: > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services > > for just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > 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 >
Can you provide a standalone example that exhibits this problem? I'm not able to reproduce this with 0.90.1 and the imshow examples (image_demo.py, image_origin.py). Which backend are you using? My only wild guess is -- with the Agg backend (possibly others), the image is stored flipped from how Agg wants to render it. So, the image is flipped (not the data, just the stride), then it is drawn, then it is flipped back. If there were an exception in the middle there, the number of flips may not remain even. Are there any exceptions being output? (These exceptions, since they're inside a GUI callback wouldn't necessarily halt the application). Beyond that, you could trace calls to im.flipupd_out and make sure they are even in number. Cheers, Mike John Pye wrote: > Hi all > > I have a problem with 'imshow' under matplotlib 0.90.1-2ubuntu1 on > ubuntu 7.10. I have an 'incidence matrix' created using the 'imshow' > command, and it works well except for the fact that sometimes when > resizing my window, the incidence matrix flips upside-down. > > Can I control this flipping of the incidence matrix? it seems to me to > be something that has just happened in a recent release of matplotlib, > as my application didn't used to show this problem. > > FYI The code that I'm using to drive mpl is here: > http://ascendcode.cheme.cmu.edu/viewvc.cgi/code/branches/extfn/pygtk/incidencematrix.py?view=markup > > Cheers > JP > > > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > 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
I don't think it's currently possible in any sort of "automatic" way. There have been thoughts of adding support for multiple y labels in the past, but that's a medium-sized chunk of work. However, as a roundabout approach, you could add figure text: t = gcf().text(0.5, 0.05, "Margin $", horizontalalignment='center', color=marginColor) The location of the text is specified relative to the whole figure (in the range 0-1). It may take some tweaking to get the positioning right. BTW -- I don't know if you're using 0.90 or 0.91. In 0.91, since the string "Sales $\nMargin $" has two dollar-signs, the section between them will be treated as math notation. To avoid that, you can escape the dollar signs, i.e. "Sales \\$\nMargin \\$". Cheers, Mike John Harrison wrote: > Is there a way to have two colors of text on an axis label? I am > trying to plot sales dollars and margin dollars on the same graph in > different colors. That works well enough but I'm having a hard time > labeling the yaxis > > plot_date(dates,units,visible = False) > bar(dates,sales,width=5.0,color = salesColor) > bar(dates,margin,width=5.0,color = marginColor) > ylabel("Sales $\nMargin $",color=salesColor) > > gets me "Sales $" in the proper color but I can't figure out if it is > possible to have "Margin $" in its color as well. > > Thanks! > John > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > 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
I'm not able to reproduce this bug here (on a Linux machine). Which backend are you using? What version of matplotlib? Can you set the parameter "verbose.level" to "debug-annoying" and send the output to this list? Cheers, Mike Orest Kozyar wrote: > I've been trying to set the font properties of the plots that I've > been making with matplotlib; however, there appears to be a problem > with font rendering. For example, when I check the properties of text > on the axes, etc, the font class is set to serif; however, the font in > the plot does not appear to be serif. I ran several of the font demos > in the matplotlib examples directory, and the fonts all looked the > same (except for size). Attached is the PNG of the fonts_demo.py > output. > > The only way I was able to get serif fonts was if I call: > > rc('text', usetex=True), and even then this only changes the fonts on > the axis tick labels. xlabel, ylabel still remain sans-serif. > > I'm sure I am missing something obvious, but have read through all the > documentation available on the matplotlib website regarding fonts, and > they don't seem to indicate that I need to install anything else. > > This is Python 2.5 on Windows XP. > > Thanks, > Orest > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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
Hi all I have a problem with 'imshow' under matplotlib 0.90.1-2ubuntu1 on ubuntu 7.10. I have an 'incidence matrix' created using the 'imshow' command, and it works well except for the fact that sometimes when resizing my window, the incidence matrix flips upside-down. Can I control this flipping of the incidence matrix? it seems to me to be something that has just happened in a recent release of matplotlib, as my application didn't used to show this problem. FYI The code that I'm using to drive mpl is here: http://ascendcode.cheme.cmu.edu/viewvc.cgi/code/branches/extfn/pygtk/incidencematrix.py?view=markup Cheers JP
Is there a way to have two colors of text on an axis label? I am trying to plot sales dollars and margin dollars on the same graph in different colors. That works well enough but I'm having a hard time labeling the yaxis plot_date(dates,units,visible = False) bar(dates,sales,width=5.0,color = salesColor) bar(dates,margin,width=5.0,color = marginColor) ylabel("Sales $\nMargin $",color=salesColor) gets me "Sales $" in the proper color but I can't figure out if it is possible to have "Margin $" in its color as well. Thanks! John
Does a LineCollection generated by contour() have a property that holds the labels? I would like to label my contour lines with roman numerals, and cannot figure out how to get clabel to do that. Thanks, Mike ------------------------------------------------------ Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ------------------------------------------------------
I've been trying to set the font properties of the plots that I've been making with matplotlib; however, there appears to be a problem with font rendering. For example, when I check the properties of text on the axes, etc, the font class is set to serif; however, the font in the plot does not appear to be serif. I ran several of the font demos in the matplotlib examples directory, and the fonts all looked the same (except for size). Attached is the PNG of the fonts_demo.py output. The only way I was able to get serif fonts was if I call: rc('text', usetex=True), and even then this only changes the fonts on the axis tick labels. xlabel, ylabel still remain sans-serif. I'm sure I am missing something obvious, but have read through all the documentation available on the matplotlib website regarding fonts, and they don't seem to indicate that I need to install anything else. This is Python 2.5 on Windows XP. Thanks, Orest
I came across this today and thought there might be interest in this on the matplotlib list. "reinteract" is an edit-in-place shell, that includes rudimentary matplotlib support. http://fishsoup.net/software/reinteract/ It's still in its early stages, but the approach seems very promising. Be sure to watch the screencast past the half way mark where the author demonstrates the matplotlib integration. Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
On Dec 12, 2007 7:16 AM, Paul Kienzle <pki...@ni...> wrote: > I'm curious about the term 'threading backend'. > > Recently I posted a question about how to handle slow plots, suggesting > that the backend canvas have an isabort() method so that the renderer > can stop what it is doing and post the current bitmap as it stands. > This is to support interactive operations such as panning and resizing > on large data collections. > > Do you mean something similar when you say 'threading backend', and is > it already supported in IPython? No, it just means that ipython can run in conjunction with the major GUI toolkits in a non-blocking manner. In a plain python shell, if you open a plot window (for any backend other than Tk), you can't go back to the prompt and keep typing until you close the plot. IPython allows that to happen, with Wx, GTK, Qt and Qt4. Cheers, f
Michael Hearne wrote: > All: I have an issue I'm hoping someone here can help with. I've > created a encapsulated postscript figure from pylab (basemap, > actually, but it shouldn't make a difference), and I'd like to have > the entire saved image be the extent of the axes, with no border > whatsoever. Is there a way to set the extent of either the axes or > the figure so that this is so? > > And before someone points this out to me - yes, I realize that there > are other tools (ImageMagick, for example) I could use to trim the > whitespace around the edge of the image, but this is part of an > automated system and I'd prefer not to have to bomb out to a shell for > something like that. > > Thanks, > > Mike > > Mike: Create an axes instance (before drawing anything with your basemap instance) like this: fig = pylab.figure(figsize=(X,Y)) ax = fig.add_axes([0,0,1,1]) X and Y need to be set to the desired width and height of your figure in inches. To avoid having any border, Y/X must be exactly equal to the aspect ratio of the map projection region (which you can get from the 'aspect' Basemap instance variable). -Jeff -- 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 Dec 12, 2007 1:29 PM, Mark Bakker <ma...@gm...> wrote: > It seems that in the latest version (0.9.1) the location of the images, such > as home.ppm, has moved to a new directory. > It used to be in ...\mpl-data and now it is in ...\mpl-data\images > > This totally breaks my code, as I use my own toolbar that uses these images, > with a hardcoded location of the ppm files. I know, I should from now on > distribute these ppm files with the distribution of my own program, but > there may be others that have this problem. > > Not sure what the best solution is. WIll it remain in this new images > directory from now on? Can't say for sure, but we have no plans to move it. You may want to follow the API_CHANGES at http://matplotlib.sf.net/API_CHANGES, which we update whenever we do something that breaks code. This move to the images subdirectory in the install directory was noted with: Moved data files into lib/matplotlib so that setuptools' develop mode works. Re-organized the mpl-data layout so that this source structure is maintained in the installation. (I.e. the 'fonts' and 'images' sub-directories are maintained in site-packages.). Suggest removing site-packages/matplotlib/mpl-data and ~/.matplotlib/ttffont.cache before installing Admittedly a bit cryptic. JDH > > Thanks, > > Mark > > ps. Cross-posted on the users and development list > ps2. Sorry, it sounds like I am bitching, but I really like matplotlib. Just > needed to point out this backwards incompatibility, which may just be ugly > coding on my part > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
You can set the position of the axes with "set_position" and give it a list of the form [l, b, w, h], where the values range from 0 to 1. e.g.: gca().set_position([0, 0, 1, 1]) Cheers, Mike Michael Hearne wrote: > All: I have an issue I'm hoping someone here can help with. I've > created a encapsulated postscript figure from pylab (basemap, actually, > but it shouldn't make a difference), and I'd like to have the entire > saved image be the extent of the axes, with no border whatsoever. Is > there a way to set the extent of either the axes or the figure so that > this is so? > > And before someone points this out to me - yes, I realize that there are > other tools (ImageMagick, for example) I could use to trim the > whitespace around the edge of the image, but this is part of an > automated system and I'd prefer not to have to bomb out to a shell for > something like that. > > Thanks, > > Mike > > > > > ------------------------------------------------------ > Michael Hearne > mh...@us... <mailto:mh...@us...> > (303) 273-8620 > USGS National Earthquake Information Center > 1711 Illinois St. Golden CO 80401 > Senior Software Engineer > Synergetics, Inc. > ------------------------------------------------------ > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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
All: I have an issue I'm hoping someone here can help with. I've created a encapsulated postscript figure from pylab (basemap, actually, but it shouldn't make a difference), and I'd like to have the entire saved image be the extent of the axes, with no border whatsoever. Is there a way to set the extent of either the axes or the figure so that this is so? And before someone points this out to me - yes, I realize that there are other tools (ImageMagick, for example) I could use to trim the whitespace around the edge of the image, but this is part of an automated system and I'd prefer not to have to bomb out to a shell for something like that. Thanks, Mike ------------------------------------------------------ Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ------------------------------------------------------
Barry Wark wrote: > We're just hoping to integrate the > plot output with the Quartz rendeirng system more completely -- a very > platform specific goal. Fair enough, and MPL as a whole could learn from your work too. Do please report your progress. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
Ok, I've just read the thread "Repeated calls to set_text using TeX formatting results in RuntimeError" which looked very similar to our problem and after applying the fix which is suggested there by Michael Droettboom (see below), the problem seems to disappear. Let's hope this gets fixed in 0.91.2. Open the file "font_manager.py", which should live in "%PYTHONPATH%/Lib/site-packages/matplotlib". Around line 681, you'll find the function: def __hash__(self): return hash(repr(self.__props)) Change it to: def __hash__(self): return hash(repr(self.__props.__dict__)) (Obviously, back up the file first...) On Dec 12, 2007 8:32 PM, Armando Serrano Lombillo <ars...@gm...> wrote: > I'm running into the very same problem. I'm using matplotlib from a > wxPython application, the same versions as you (Yongtao Cui), and I get the > same error (see below) after repainting a figure many times. In my case I > plot several figures (16 figures) and I get the error with very few > repaintings. This didn't happen with matplotlib 0.90.1. > > Any fix besides going back to matplotlib 0.90.1? > > > Traceback (most recent call last): > Traceback (most recent call last): > File "C:\Tesis\Programa\visualizador.py", line 93, in on_intervalos > File "C:\Tesis\Programa\visualizador.py", line 126, in pinta > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py", line > 61, in draw > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 380, in draw > File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 612, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1344, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 596, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 170, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 775, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 317, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 195, in > _get_layout > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 234, in get_text_width_height_descent > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 301, in _get_agg_font > RuntimeError: Could not open facefile C:\WINDOWS\Fonts\verdana.ttf; > Cannot_Open_Resource > > File "C:\Tesis\Programa\visualizador.py", line 93, in on_intervalos > File "C:\Tesis\Programa\visualizador.py", line 126, in pinta > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py", line > 61, in draw > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 380, in draw > File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 612, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1344, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 596, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 170, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 775, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 317, in > draw > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 195, in > _get_layout > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 234, in get_text_width_height_descent > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 301, in _get_agg_font > RuntimeError: Could not open facefile C:\WINDOWS\Fonts\verdana.ttf; > Cannot_Open_Resource > > > > > On Dec 5, 2007 3:15 AM, Yongtao Cui <cui...@gm...> wrote: > > > I don't know why those spaces always don't show up on the mailing list > > webpage. They looked fine on my gmail page. > > > > The 'test' function only has one 'for' loop. The four lines below the > > 'for' line are all in the loop. > > > > > > > > On Dec 4, 2007 8:52 PM, Yongtao Cui <cui...@gm...> wrote: > > > >>> import pylab > > > >>> def test(n): > > > >>> for i in range(n): > > > >>> f=pylab.figure(1) > > > >>> f.clf() > > > >>> a=f.add_axes([0.2, 0.2, 0.6 , 0.6]) > > > >>> a.plot([1,2,3,4,5], 'ro') > > > >>> > > > > > > I tracked down the svn tree. The above script works ok in revision > > > 3737 and before, but crashes from revision 3738 and after. > > > > > > Yongtao > > > > > > > > > On Dec 2, 2007 4:15 PM, Yongtao Cui <cui...@gm...> wrote: > > > > Below is the minimum code with the right indent > > > > > > > > import pylab > > > > def test(n): > > > > for i in range(n): > > > > f=pylab.figure(1) > > > > f.clf() > > > > a=f.add_axes([0.2, 0.2, 0.6 , 0.6]) > > > > a.plot([1,2,3,4,5], 'ro') > > > > > > > > > > > > On Dec 2, 2007 4:07 PM, Yongtao Cui <cui...@gm...> wrote: > > > > > Hi, > > > > > > > > > > I got the following error when clearing and plotting on the same > > > > > figure for many times. I found the following minimum code to > > reproduce > > > > > this error. I am using matplotlib-0.91.1 and wxpython2.8 on > > windows > > > > > xp. In the matplotlibrc file, I changed the backend to WXAgg and > > > > > interactive to True. > > > > > > > > > > import pylab > > > > > def test(n): > > > > > for i in range(n): > > > > > f=pylab.figure(1) > > > > > f.clf() > > > > > a=f.add_axes([0.2, 0.2, 0.6, 0.6]) > > > > > a.plot([1,2,3,4,5], 'ro') > > > > > > > > > > > > > > > The error only happens for a large n. For example, test(10) works > > > > > fine, but test(50) will cause the error. Also runing test(10) for > > a > > > > > few times will also cause the error. > > > > > > > > > > Could anyone give me some help? > > > > > > > > > > Thanks. > > > > > > > > > > The following is the error message: > > > > > > > > > > Traceback (most recent call last): > > > > > File "<input>", line 1, in <module> > > > > > File "<input>", line 3, in test > > > > > File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line > > 191, in figure > > > > > File > > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py", > > > > > line 1227, in draw_if_interactive > > > > > File > > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py", > > > > > line 61, in draw > > > > > File > > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > > > > line 380, in draw > > > > > File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line > > 612, in draw > > > > > File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line > > 1344, in draw > > > > > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line > > 596, in draw > > > > > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line > > 170, in draw > > > > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line > > 775, in draw > > > > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line > > 317, in draw > > > > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line > > 195, > > > > > in _get_layout > > > > > File > > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > > > > line 234, in get_text_width_height_descent > > > > > File > > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > > > > line 301, in _get_agg_font > > > > > RuntimeError: Could not open facefile > > > > > > > C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf; > > > > > Cannot_Open_Resource > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > SF.Net email is sponsored by: The Future of Linux Business White Paper > > from Novell. From the desktop to the data center, Linux is going > > mainstream. Let it simplify your IT future. > > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > >
I'm running into the very same problem. I'm using matplotlib from a wxPython application, the same versions as you (Yongtao Cui), and I get the same error (see below) after repainting a figure many times. In my case I plot several figures (16 figures) and I get the error with very few repaintings. This didn't happen with matplotlib 0.90.1. Any fix besides going back to matplotlib 0.90.1? Traceback (most recent call last): Traceback (most recent call last): File "C:\Tesis\Programa\visualizador.py", line 93, in on_intervalos File "C:\Tesis\Programa\visualizador.py", line 126, in pinta File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py", line 61, in draw File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", line 380, in draw File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 612, in draw File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1344, in draw File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 596, in draw File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 170, in draw File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 775, in draw File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 317, in draw File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 195, in _get_layout File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", line 234, in get_text_width_height_descent File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", line 301, in _get_agg_font RuntimeError: Could not open facefile C:\WINDOWS\Fonts\verdana.ttf; Cannot_Open_Resource File "C:\Tesis\Programa\visualizador.py", line 93, in on_intervalos File "C:\Tesis\Programa\visualizador.py", line 126, in pinta File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py", line 61, in draw File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", line 380, in draw File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 612, in draw File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1344, in draw File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 596, in draw File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 170, in draw File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 775, in draw File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 317, in draw File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 195, in _get_layout File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", line 234, in get_text_width_height_descent File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", line 301, in _get_agg_font RuntimeError: Could not open facefile C:\WINDOWS\Fonts\verdana.ttf; Cannot_Open_Resource On Dec 5, 2007 3:15 AM, Yongtao Cui <cui...@gm...> wrote: > I don't know why those spaces always don't show up on the mailing list > webpage. They looked fine on my gmail page. > > The 'test' function only has one 'for' loop. The four lines below the > 'for' line are all in the loop. > > > > On Dec 4, 2007 8:52 PM, Yongtao Cui <cui...@gm...> wrote: > > >>> import pylab > > >>> def test(n): > > >>> for i in range(n): > > >>> f=pylab.figure(1) > > >>> f.clf() > > >>> a=f.add_axes([0.2, 0.2, 0.6, 0.6]) > > >>> a.plot([1,2,3,4,5], 'ro') > > >>> > > > > I tracked down the svn tree. The above script works ok in revision > > 3737 and before, but crashes from revision 3738 and after. > > > > Yongtao > > > > > > On Dec 2, 2007 4:15 PM, Yongtao Cui <cui...@gm...> wrote: > > > Below is the minimum code with the right indent > > > > > > import pylab > > > def test(n): > > > for i in range(n): > > > f=pylab.figure(1) > > > f.clf() > > > a=f.add_axes([0.2, 0.2, 0.6, 0.6]) > > > a.plot([1,2,3,4,5], 'ro') > > > > > > > > > On Dec 2, 2007 4:07 PM, Yongtao Cui <cui...@gm...> wrote: > > > > Hi, > > > > > > > > I got the following error when clearing and plotting on the same > > > > figure for many times. I found the following minimum code to > reproduce > > > > this error. I am using matplotlib-0.91.1 and wxpython2.8 on windows > > > > xp. In the matplotlibrc file, I changed the backend to WXAgg and > > > > interactive to True. > > > > > > > > import pylab > > > > def test(n): > > > > for i in range(n): > > > > f=pylab.figure(1) > > > > f.clf() > > > > a=f.add_axes([0.2, 0.2, 0.6, 0.6]) > > > > a.plot([1,2,3,4,5], 'ro') > > > > > > > > > > > > The error only happens for a large n. For example, test(10) works > > > > fine, but test(50) will cause the error. Also runing test(10) for a > > > > few times will also cause the error. > > > > > > > > Could anyone give me some help? > > > > > > > > Thanks. > > > > > > > > The following is the error message: > > > > > > > > Traceback (most recent call last): > > > > File "<input>", line 1, in <module> > > > > File "<input>", line 3, in test > > > > File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line > 191, in figure > > > > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py", > > > > line 1227, in draw_if_interactive > > > > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py", > > > > line 61, in draw > > > > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > > > line 380, in draw > > > > File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line > 612, in draw > > > > File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1344, > in draw > > > > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 596, > in draw > > > > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 170, > in draw > > > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 775, > in draw > > > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 317, > in draw > > > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 195, > > > > in _get_layout > > > > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > > > line 234, in get_text_width_height_descent > > > > File > "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > > > line 301, in _get_agg_font > > > > RuntimeError: Could not open facefile > > > > > C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf; > > > > Cannot_Open_Resource > > > > > > > > > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >