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}
(151) 
_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

S  M  T  W  T  F  S 

1
(2) 
2
(8) 
3
(8) 
4
(3) 
5
(15) 
6
(11) 
7
(4) 
8

9
(3) 
10
(21) 
11
(5) 
12
(7) 
13
(10) 
14
(12) 
15
(3) 
16
(4) 
17
(16) 
18
(20) 
19
(11) 
20
(9) 
21
(1) 
22

23
(15) 
24
(11) 
25
(1) 
26
(9) 
27
(5) 
28

29
(1) 
30

31
(6) 




From: Eric Firing <efiring@ha...>  20070704 17:45:53

Benoit, Thanks for pointing this out. I am not a boxplotuser, but a quick look together with your post and Rob's suggests to me that some version of Rob's enhancements should be committed to svn. I think it might be possible to simplify the argument list; a bit of code review would be good. Regarding your modification of linewidth, do you think this really needs to be yet another kwarg, or is it adequate to be able to adjust the linewidth with a line of user code after calling boxplot? The method returns a dictionary with the various lists of line objects that have been drawn, so any properties of those objects can be altered. Perhaps a more thorough updating of boxplot would use collections instead of lists of lines. Any volunteers? I am not going to do it. This would speed it up for cases with many points, but maybe boxplot is normally used with few enough points that this doesn't matter. Eric Benoit Donnet wrote: > Guys, > >> Is it possible >> to increase the linewidth of the box plot (and change the color  >> i.e., from blue to black)? In the documentation, I don't see any >> option for boxplot regarding that point (the "widths" option refers >> to the width of the box, not the line). > > Looking in the matplotlibdevel mailinglist, I found a brand new > version of the boxplot method (written by Rob Clewley). This method > allows me to have a monochrome plot. This is quite better. > > I then modified Rob's code for getting linewidth (that's 100% hacking >  I'm not proud of it). > > Sorry for the disturbance. > > Benoit > >> I agree it is a cosmetic question but I think it would be better in a >> paper if I can change the linewidth and color. >> >> Thanks in advance. >> >> Keep on rockin' >> >> Benoit >> >> Le 03juil.07 à 19:52, Jeff Whitaker a écrit : >> >>> Benoit Donnet wrote: >>>> Hey guys, >>>> >>>> I'm trying to plot quantiles information (percentile 10, 25, 50, >>>> 75 and 90). Attached, you'll find a jpged of what I would like to >>>> do (this was done using Gnuplot): the vertical line delineates the >>>> range from the 10th to the 90th percentile. Small tick bars to >>>> either side of the lines mark some additional percentiles: bar to >>>> the left for the 25th and bar to the right for the 75th. Finally, >>>> dots mark the median. >>>> >>>> I attempted to use matplotlib.finance modules. In particular, the >>>> candlestick stuffs are quite close to what I want. But it didn't >>>> work as the XAxis does not correspond to a date information (X >>>> Axis values are within the range [1:1780]). >>>> >>>> Have you got an idea on how I can plot that using matplotlib? >>>> >>>> Thanks in advance. >>>> >>>> Keep on rockin' >>>> >>>> Benoit >>>> >>> Benoit: This looks very similar to what the boxplot function does >>> (see http://matplotlib.sourceforge.net/matplotlib.pylab.html# >>> boxplot and boxplot_demo.py). If you want to tweak it, the boxplot >>> function in axes.py might be a good starting point. >>> >>> Jeff >>> >>>  >>> Jeffrey S. Whitaker Phone : (303)4976313 >>> Meteorologist FAX : (303)4976449 >>> NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... >>> 325 Broadway Office : Skaggs Research Cntr 1D124 >>> Boulder, CO, USA 803033328 Web : http://tinyurl.com/5telg >>> >>  >> Dr. Benoit Donnet >> Université Catholique de Louvain (UCL) >> Faculté des Sciences Appliquées  Département d'Ingénierie >> Informatique (INGI) >> Place Sainte Barbe, 2 >> 1348 LouvainlaNeuve >> Belgium >> Phone: +32 10 47 87 18 >> Home page: http://inl.info.ucl.ac.be/donnet >> >> >> >> >>  >>  >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C  the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Matplotlibusers mailing list >> Matplotlibusers@... >> https://lists.sourceforge.net/lists/listinfo/matplotlibusers > >  > Dr. Benoit Donnet > Université Catholique de Louvain (UCL) > Faculté des Sciences Appliquées  Département d'Ingénierie > Informatique (INGI) > Place Sainte Barbe, 2 > 1348 LouvainlaNeuve > Belgium > Phone: +32 10 47 87 18 > Home page: http://inl.info.ucl.ac.be/donnet > > > > >  > This SF.net email is sponsored by DB2 Express > Download DB2 Express C  the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers 
From: Benoit Donnet <benoit.donnet@uc...>  20070704 13:52:41

Guys, > Is it possible > to increase the linewidth of the box plot (and change the color  > i.e., from blue to black)? In the documentation, I don't see any > option for boxplot regarding that point (the "widths" option refers > to the width of the box, not the line). Looking in the matplotlibdevel mailinglist, I found a brand new =20 version of the boxplot method (written by Rob Clewley). This method =20 allows me to have a monochrome plot. This is quite better. I then modified Rob's code for getting linewidth (that's 100% hacking =20=  I'm not proud of it). Sorry for the disturbance. Benoit > I agree it is a cosmetic question but I think it would be better in a > paper if I can change the linewidth and color. > > Thanks in advance. > > Keep on rockin' > > Benoit > > Le 03juil.07 =E0 19:52, Jeff Whitaker a =E9crit : > >> Benoit Donnet wrote: >>> Hey guys, >>> >>> I'm trying to plot quantiles information (percentile 10, 25, 50, >>> 75 and 90). Attached, you'll find a jpged of what I would like to >>> do (this was done using Gnuplot): the vertical line delineates the >>> range from the 10th to the 90th percentile. Small tick bars to >>> either side of the lines mark some additional percentiles: bar to >>> the left for the 25th and bar to the right for the 75th. Finally, >>> dots mark the median. >>> >>> I attempted to use matplotlib.finance modules. In particular, the >>> candlestick stuffs are quite close to what I want. But it didn't >>> work as the XAxis does not correspond to a date information (X >>> Axis values are within the range [1:1780]). >>> >>> Have you got an idea on how I can plot that using matplotlib? >>> >>> Thanks in advance. >>> >>> Keep on rockin' >>> >>> Benoit >>> >> >> Benoit: This looks very similar to what the boxplot function does >> (see http://matplotlib.sourceforge.net/matplotlib.pylab.html# >> boxplot and boxplot_demo.py). If you want to tweak it, the boxplot >> function in axes.py might be a good starting point. >> >> Jeff >> >> =20 >> Jeffrey S. Whitaker Phone : (303)4976313 >> Meteorologist FAX : (303)4976449 >> NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... >> 325 Broadway Office : Skaggs Research Cntr 1D124 >> Boulder, CO, USA 803033328 Web : http://tinyurl.com/5telg >> > >  > Dr. Benoit Donnet > Universit=E9 Catholique de Louvain (UCL) > Facult=E9 des Sciences Appliqu=E9es  D=E9partement d'Ing=E9nierie > Informatique (INGI) > Place Sainte Barbe, 2 > 1348 LouvainlaNeuve > Belgium > Phone: +32 10 47 87 18 > Home page: http://inl.info.ucl.ac.be/donnet > > > > > =20= >  > This SF.net email is sponsored by DB2 Express > Download DB2 Express C  the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers  Dr. Benoit Donnet Universit=E9 Catholique de Louvain (UCL) Facult=E9 des Sciences Appliqu=E9es  D=E9partement d'Ing=E9nierie =20 Informatique (INGI) Place Sainte Barbe, 2 1348 LouvainlaNeuve Belgium Phone: +32 10 47 87 18 Home page: http://inl.info.ucl.ac.be/donnet 
From: Benoit Donnet <Benoit.Donnet@uc...>  20070704 12:03:40

Thanks for the advice, Jeff. That's really what I was looking for. I still have another question (I'm sorry for that). Is it possible =20 to increase the linewidth of the box plot (and change the color  =20 i.e., from blue to black)? In the documentation, I don't see any =20 option for boxplot regarding that point (the "widths" option refers =20 to the width of the box, not the line). I agree it is a cosmetic question but I think it would be better in a =20= paper if I can change the linewidth and color. Thanks in advance. Keep on rockin' Benoit Le 03juil.07 =E0 19:52, Jeff Whitaker a =E9crit : > Benoit Donnet wrote: >> Hey guys, >> >> I'm trying to plot quantiles information (percentile 10, 25, 50, =20 >> 75 and 90). Attached, you'll find a jpged of what I would like to =20= >> do (this was done using Gnuplot): the vertical line delineates the =20= >> range from the 10th to the 90th percentile. Small tick bars to =20 >> either side of the lines mark some additional percentiles: bar to =20 >> the left for the 25th and bar to the right for the 75th. Finally, =20= >> dots mark the median. >> >> I attempted to use matplotlib.finance modules. In particular, the =20= >> candlestick stuffs are quite close to what I want. But it didn't =20 >> work as the XAxis does not correspond to a date information (X=20 >> Axis values are within the range [1:1780]). >> >> Have you got an idea on how I can plot that using matplotlib? >> >> Thanks in advance. >> >> Keep on rockin' >> >> Benoit >> > > Benoit: This looks very similar to what the boxplot function does =20 > (see http://matplotlib.sourceforge.net/matplotlib.pylab.html#=20 > boxplot and boxplot_demo.py). If you want to tweak it, the boxplot =20= > function in axes.py might be a good starting point. > > Jeff > > =20 > Jeffrey S. Whitaker Phone : (303)4976313 > Meteorologist FAX : (303)4976449 > NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... > 325 Broadway Office : Skaggs Research Cntr 1D124 > Boulder, CO, USA 803033328 Web : http://tinyurl.com/5telg >  Dr. Benoit Donnet Universit=E9 Catholique de Louvain (UCL) Facult=E9 des Sciences Appliqu=E9es  D=E9partement d'Ing=E9nierie =20 Informatique (INGI) Place Sainte Barbe, 2 1348 LouvainlaNeuve Belgium Phone: +32 10 47 87 18 Home page: http://inl.info.ucl.ac.be/donnet 
From: Giorgio F. Gilestro <giorgio@gi...>  20070703 23:47:21

I am encountering a font problem when I try to save in .PS or .EPS format. I am using matplotlib 0.90 on windows xp but I had the very same problem with the older version too. See attached output: http://img207.imageshack.us/img207/3966/croppercapture11kg8.jpg Any idea?  Giorgio giorgio@... http://www.cafelamarck.it 
From: Jeff Whitaker <jswhit@fa...>  20070703 17:52:21

Benoit Donnet wrote: > Hey guys, > > I'm trying to plot quantiles information (percentile 10, 25, 50, 75 > and 90). Attached, you'll find a jpged of what I would like to do > (this was done using Gnuplot): the vertical line delineates the range > from the 10th to the 90th percentile. Small tick bars to either side > of the lines mark some additional percentiles: bar to the left for the > 25th and bar to the right for the 75th. Finally, dots mark the median. > > I attempted to use matplotlib.finance modules. In particular, the > candlestick stuffs are quite close to what I want. But it didn't work > as the XAxis does not correspond to a date information (XAxis values > are within the range [1:1780]). > > Have you got an idea on how I can plot that using matplotlib? > > Thanks in advance. > > Keep on rockin' > > Benoit > Benoit: This looks very similar to what the boxplot function does (see http://matplotlib.sourceforge.net/matplotlib.pylab.html#boxplot and boxplot_demo.py). If you want to tweak it, the boxplot function in axes.py might be a good starting point. Jeff  Jeffrey S. Whitaker Phone : (303)4976313 Meteorologist FAX : (303)4976449 NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... 325 Broadway Office : Skaggs Research Cntr 1D124 Boulder, CO, USA 803033328 Web : http://tinyurl.com/5telg 
From: Christopher Barker <Chris.Barker@no...>  20070703 17:47:41

Nicolas wrote: > I think however matplotlib may be used only (and it will be even better > as I plan to make a Qt version in the future) good idea. > So, in : > >>> from matplotlib.transforms import Value > >>> from matplotlib.backends.backend_agg import RendererAgg > >>> r = RendererAgg(50, 50, Value(72)) > >>> r.draw_image (0, 0, im) > > What is the correct format for im ? I'm no expert, but probably a string that's the same format as what tostring_argb() returns, so something like this should work (untested!): buffer = self.get_renderer().tostring_argb() l, h = self.GetSize() matrix = numpy.fromstring(buffer, dtype=numpy.byte) matrix.shape = (l,h,4) # 4 for a,r,g,b sub_matrix = matrix[min_x:max_x, min:y_max_y, :] r.draw_image (0, 0, sub_matrix.tostring()) Chris  Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 5266959 voice 7600 Sand Point Way NE (206) 5266329 fax Seattle, WA 98115 (206) 5266317 main reception Chris.Barker@... 
From: Paul Kienzle <pkienzle@ja...>  20070703 15:56:10

Hi, I would like to be able to use matplotlib as an object canvas, where items on the canvas receive mouse events (enter, leave, press, release) and the registered callback is invoked. For example, I want to be able to highlight the line associated with the legend entry as I mouse over the legend, and conversely highlight the legend entry associated with the line as I mouse over the line. I will also want to do operations such right clicking on the axis to modify axis properties such as linear/log scale, and click on legend entries to toggle lines on and off. >From looking at the pick_event_demo in examples, I have a lot of work ahead of me. Is this the state of the art? Before diving in and figuring out how to do some of these things, I would like to know if others have already implemented similar features in the current architecture, and if there are any plans in the works for upgrading the architecture that would make this easier. Thanks in advance,  Paul 
From: Jeff Whitaker <jswhit@fa...>  20070703 11:59:15

Michael Newman wrote: > My understanding is the "contour" method only handles plots of > functions, e.g. f(x,y) = z, and not discrete points. I tried looking > into this weeks ago, and couldn't find a way to handle discrete points. > > I'd love to be able to do Kriging or Inverse Distance Weighting contour > lines on XY points I have of pollution concentrations at various monitors... > > Michael: There are three different methods for doing this described at http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data Jeff  Jeffrey S. Whitaker Phone : (303)4976313 NOAA/OAR/CDC R/PSD1 FAX : (303)4976449 325 Broadway Boulder, CO, USA 803053328 
From: Michael Newman <michael.b.newman@gm...>  20070703 09:55:16

My understanding is the "contour" method only handles plots of functions, e.g. f(x,y) = z, and not discrete points. I tried looking into this weeks ago, and couldn't find a way to handle discrete points. I'd love to be able to do Kriging or Inverse Distance Weighting contour lines on XY points I have of pollution concentrations at various monitors... 
From: Nicolas <nico_75_0@ya...>  20070703 08:32:40

Thank you very much. I know very little about numpy in fact. If I don't find a pure matplotlib method, I will use your suggestion with wx. I think however matplotlib may be used only (and it will be even better as I plan to make a Qt version in the future) So, in : >>> from matplotlib.transforms import Value >>> from matplotlib.backends.backend_agg import RendererAgg >>> r = RendererAgg(50, 50, Value(72)) >>> r.draw_image(0, 0, im) What is the correct format for im ? Thanks, Nicolas On 7/2/07, Christopher Barker <Chris.Barker@...> wrote: > > I don't know how to do it with the MPL agg backend, but I think you > mentioned wx, and you can do it there instead. a wxImage can be > constructed from a buffer object, then saved as a PNG. You may need to > set the rgb and alpha portions separately. See the wxPython wiki and > search for "Image". > > Also: > > > matrix = [] > > buffer = self.get_renderer().tostring_argb() > > l, h = self.GetSize() > > for ligne in xrange(h): > > matrix.append([]) > > for colonne in xrange(l): > > i = 4*(ligne*h + colonne) > > pixel = buffer[i:i+4] > > matrix[1].append(pixel) > > This is a very slow way to create the numpy array! > > Option a: first create an empty array: > > matrix = numpy.empty((l,h,4), numpy.byte) > > then fill that in. but even better: > > you can build the array directly from the buffer string: > > matrix = numpy.fromstring(buffer, dtype=numpy.byte) > lotlibusers > >  > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 5266959 voice > 7600 Sand Point Way NE (206) 5266329 fax > Seattle, WA 98115 (206) 5266317 main reception > > Chris.Barker@... > 
From: Benoit Donnet <benoit.donnet@uc...>  20070703 08:13:32

Hey guys, I'm trying to plot quantiles information (percentile 10, 25, 50, 75 and 90). Attached, you'll find a jpged of what I would like to do (this was done using Gnuplot): the vertical line delineates the range from the 10th to the 90th percentile. Small tick bars to either side of the lines mark some additional percentiles: bar to the left for the 25th and bar to the right for the 75th. Finally, dots mark the median. I attempted to use matplotlib.finance modules. In particular, the candlestick stuffs are quite close to what I want. But it didn't work as the XAxis does not correspond to a date information (XAxis values are within the range [1:1780]). Have you got an idea on how I can plot that using matplotlib? Thanks in advance. Keep on rockin' Benoit 
From: Christopher Barker <Chris.Barker@no...>  20070702 21:57:04

I don't know how to do it with the MPL agg backend, but I think you mentioned wx, and you can do it there instead. a wxImage can be constructed from a buffer object, then saved as a PNG. You may need to set the rgb and alpha portions separately. See the wxPython wiki and search for "Image". Also: > matrix = [] > buffer = self.get_renderer().tostring_argb() > l, h = self.GetSize() > for ligne in xrange(h): > matrix.append([]) > for colonne in xrange(l): > i = 4*(ligne*h + colonne) > pixel = buffer[i:i+4] > matrix[1].append(pixel) This is a very slow way to create the numpy array! Option a: first create an empty array: matrix = numpy.empty((l,h,4), numpy.byte) then fill that in. but even better: you can build the array directly from the buffer string: matrix = numpy.fromstring(buffer, dtype=numpy.byte) lotlibusers  Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 5266959 voice 7600 Sand Point Way NE (206) 5266329 fax Seattle, WA 98115 (206) 5266317 main reception Chris.Barker@... 
From: Matthias Michler <MatthiasMichler@gm...>  20070702 21:50:21

Hello everybody, first of all I hope my mails on the issue 'Prompt/TextBox/InputButton' don't become to many. But I had one more idea and I want to share it with you. If you don't like my usage of lists as a pointer to variables, one could replace this in two steps: 1) Adding a new method 'get_text' to get the actual label text (def get_text(self): return self.label.get_text() ) 2) In the example one would include a function to set one's variable to the evaluated labeltext. Than one would add this function into the self.observers and so call it after every finished typing mode. This new behaviour has the big advance that errorhandling during evaluation of the text is a task for users and not to mpl. I hope I could explain my idea ... best regards, Matthias On Wednesday 27 June 2007 18:19, Matthias Michler wrote: > Hello everybody, > > in my last version I forgot to include a very useful function (it is > comparable with the 'Button.on_clicked' function). I added it now. It > allows the user to interact with other widgets ( I needed it to interact > with the Silder) or his own program (e.g. updating external values or > plots). > > I attached this new version. > > best regards, > Matthias > > On Tuesday 26 June 2007 19:46, Matthias Michler wrote: > > Hello John, > > Hello all, > > > > I thought once more about the textbox and added some of your (Johns) > > features to my class 'InputButton'. Probably my solution isn't the best > > possible, but I attached this version to express what I'm thinking of and > > to see what others think about my solution and needed skills of the > > textbox . > > > > Could this be helpful / useful for others? > > > > best regards, > > Matthias > > > > On Wednesday 06 June 2007 17:25, John Hunter wrote: > > > On 6/6/07, Matthias Michler <MatthiasMichler@...> wrote: > > > > By the way: What do you think about the "insert a 'l' or 'g' into > > > > your TextBox and get a grid or logscale"issue? Is there a > > > > possibility to switch the mplmeaning of 'l', 'g' and 'f' off? > > > > > > Yes, this is clearly an issue that has to be dealt with in a cleanup. > > > The current implementation has no concept of whether the text box is > > > the active widget. We would need to do something like activate the > > > text box when you click on it (and figure out the right cursor > > > location based on the click if there is already text in there) and > > > deactivate it on a carriage return or click in another axes. The > > > current implementation was only a proof of concept. > > > > > > JDH 
From: Eric Firing <efiring@ha...>  20070702 20:36:50

Andrew McLean wrote: [...] > Dorling cartograms described here (with an example near the bottom of > the page): > > http://www.ncgia.ucsb.edu/projects/Cartogram_Central/types.html Thanks for the link. Eric > > Regards, > > Andrew 
From: Jonathan Griffitts <jonathan@gr...>  20070702 20:24:40

In matplotlib 0.90.1 the behavior of legend() seems to have changed. Here's a test code fragment:  import pylab import numpy y=numpy.arange(10,10)**2 print y pylab.plot(y) pylab.legend() pylab.show()  Running on python 2.5.1, matplotlib 0.90.0 gives me a reasonablelooking legend in upper right corner with label "line0". matplotlib 0.90.1 gives an empty rectangular box, fairly large, right in the middle of the plot. Attempting to move the legend with loc=2 or whatever has no effect. However, giving an explicit label ( pylab.legend(['line1']) ) makes it start working the same as 0.90.0. I started looking at the source but don't have time today to understand how this is supposed to work. Maybe later. Is this the intended behavior? The announcement for 0.90.1 says: "Display only meaningful labels when calling legend() without args." It's not clear to me what this means.  Jonathan Griffitts AnyWare Engineering Boulder, CO, USA 
From: Andrew McLean <andrew@an...>  20070702 19:49:17

Eric Firing wrote: > Andrew McLean wrote: >> It all works. However, I saw in the API documentation (and the source) >> that there is a Circle object in patch. I was hoping that using this >> rather than polygons would give better quality output and possibly >> smaller files. Now I can instantiate it >> >> circle = Circle((x,y), c[3], facecolor=cmapper.to_rgba(v)) >> >> but can't work out what to do with it! I've tried >> >> ax.add_patch( circle ) > > This works for me in the sense that I can put circles or ellipses on a > plot. Note that if you are trying to do this interactively you need > to explicitly call draw() or draw_if_interactive() (pylab functions) > after the call to add_patch, because the axis methods differ from > pylab functions in that the latter automatically call > draw_if_interactive() but the former do not. > That was useful. Thanks. Turns out the problem was that I wasn't setting the axis limits. I added: axis([xmin, xmax, ymin, ymax]) and it all worked. > The circle in data coordinates is a circle, however, only if you use a > 1:1 aspect ratio. Does this suit your needs? If so you can get it > with the pylab axis('equal') or axis('scaled') command. Or do you > really want to specify the radius of the circle in xdata units or in > ydata units? (I have no idea what a Dorling Cartogram is.) I was using axis('equal'). And yes this is what I want ;). The x and y data units should map to the same physical scale and the radius is in those units. Dorling cartograms described here (with an example near the bottom of the page): http://www.ncgia.ucsb.edu/projects/Cartogram_Central/types.html Regards, Andrew 
From: Angel Lopez <anglopm@gm...>  20070702 09:49:59

Hello, I started using pylabmatplotlib some weeks ago. And it is really good. I'm working now on windows (TkAgg). I have written a small app that reads a file and plot it. User can press a key to read another file, and plot it over. The problem is that the I have to resize the plot window to see the new plotted line. Here is the code: import sys import os import tkFileDialog import pylab pylab.hold(1) path='E:\\Nima' def keyp(event): global path if event.key.lower()=='o': fin = tkFileDialog.askopenfilename(initialdir=path) path=os.path.split(fin)[0] plot2(fin) def plot2(fin): global myplot f=file(fin, 'r') lines=f.readlines() f.close() X=[] Y=[] for line in lines[1:]: line=line.replace(',', '.') X.append(float(line.split('\t')[2])) Y.append(float(line.split('\t')[5])) myplot.plot(X, Y) myplot.grid() myplot.draw() if __name__=='__main__': myplot=pylab.subplot(111) kid=pylab.connect('key_press_event', keyp) pylab.xlabel('Area [A2/molecule]') pylab.ylabel('SP [mN/m]') fin = tkFileDialog.askopenfilename(initialdir=path) path=os.path.split(fin)[0] pylab.show() plot2(fin) Thanks in advance for your help. 
From: Eric Firing <efiring@ha...>  20070702 07:21:10

Andrew McLean wrote: > I'm a new user of matplotlib (athough I have been using both Matlab and > Python for years). > > I have an application where I need to display data as a set of filled > circles. The centre and the radius of the circles are both specified in > data coordinates. The data points have an additional scalar attribute, > which is displayed using a pseudocolour mapping. > > I've hacked something together where the circles are approximated by > polygons using either the axis fill method or the pylab fill function. I > select the colour by calling the get_rgba method of a ScalarMappable > object. In the following code snippet c is a tuple containg the x and y > coords of the centre of the circle, the radius, and a scalar "value" > > theta = arange(numSegs+1) * 2.0 * math.pi / numSegs > cos_theta = cos(theta) > sin_theta = sin(theta) > for c in cart: > x = c[1] + c[3] * cos_theta > y = c[2] + c[3] * sin_theta > v = c[4] > fill(x, y, facecolor=mapper.to_rgba(v), linewidth=0.5) > > It all works. However, I saw in the API documentation (and the source) > that there is a Circle object in patch. I was hoping that using this > rather than polygons would give better quality output and possibly > smaller files. Now I can instantiate it > > circle = Circle((x,y), c[3], facecolor=cmapper.to_rgba(v)) > > but can't work out what to do with it! I've tried > > ax.add_patch( circle ) This works for me in the sense that I can put circles or ellipses on a plot. Note that if you are trying to do this interactively you need to explicitly call draw() or draw_if_interactive() (pylab functions) after the call to add_patch, because the axis methods differ from pylab functions in that the latter automatically call draw_if_interactive() but the former do not. The circle in data coordinates is a circle, however, only if you use a 1:1 aspect ratio. Does this suit your needs? If so you can get it with the pylab axis('equal') or axis('scaled') command. Or do you really want to specify the radius of the circle in xdata units or in ydata units? (I have no idea what a Dorling Cartogram is.) > > and also > > trans = blend_xy_sep_transform( ax.transAxes, ax.transData ) This doesn't sound like what you want at all; it is used when you want to specify the xcoordinate in normalized axes units and the ycoordinate in data units. Eric > circle.set_transform( trans ) > ax.add_patch( circle ) > > Neither work. Any ideas? > > Regards, > > Andrew 
From: Andrew McLean <andrewmatplotlib@an...>  20070702 00:09:58

Steve, I guess I should have highlighted the difference. For my application I need the circle radii to be given in data coordinates. For the curious, I'm plotting something very similar to Dorling Cartograms. I did look in the source of "scatter" for clues, but it uses a 20 sided polygon to approximate a circle. It looks like scatter_classic did what I wanted, but that's been removed :(.  Andrew Stephen George wrote: > It *seems* like it already does what you are trying to do?, maybe I'm > missing something in my understanding. > > Steve > > > > Andrew McLean wrote: >> I'm a new user of matplotlib (athough I have been using both Matlab and >> Python for years). >> >> I have an application where I need to display data as a set of filled >> circles. The centre and the radius of the circles are both specified in >> data coordinates. The data points have an additional scalar attribute, >> which is displayed using a pseudocolour mapping. >> >> I've hacked something together where the circles are approximated by >> polygons using either the axis fill method or the pylab fill function. I >> select the colour by calling the get_rgba method of a ScalarMappable >> object. In the following code snippet c is a tuple containg the x and y >> coords of the centre of the circle, the radius, and a scalar "value" >> >> theta = arange(numSegs+1) * 2.0 * math.pi / numSegs >> cos_theta = cos(theta) >> sin_theta = sin(theta) >> for c in cart: >> x = c[1] + c[3] * cos_theta >> y = c[2] + c[3] * sin_theta >> v = c[4] >> fill(x, y, facecolor=mapper.to_rgba(v), linewidth=0.5) >> >> It all works. However, I saw in the API documentation (and the source) >> that there is a Circle object in patch. I was hoping that using this >> rather than polygons would give better quality output and possibly >> smaller files. Now I can instantiate it >> >> circle = Circle((x,y), c[3], facecolor=cmapper.to_rgba(v)) >> >> but can't work out what to do with it! I've tried >> >> ax.add_patch( circle ) >> >> and also >> >> trans = blend_xy_sep_transform( ax.transAxes, ax.transData ) >> circle.set_transform( trans ) >> ax.add_patch( circle ) >> >> Neither work. Any ideas? >> >> Regards, >> >> Andrew >> >> 
From: Stephen George <steve_geo@op...>  20070701 23:45:09

Hi, being a newbie myself, .. I don't know if I'm misguiding you. But do wonder if you looked at the scatter command see scatter_demo2.py on http://matplotlib.sourceforge.net/screenshots.html for an example It *seems* like it already does what you are trying to do?, maybe I'm missing something in my understanding. Steve Andrew McLean wrote: > I'm a new user of matplotlib (athough I have been using both Matlab and > Python for years). > > I have an application where I need to display data as a set of filled > circles. The centre and the radius of the circles are both specified in > data coordinates. The data points have an additional scalar attribute, > which is displayed using a pseudocolour mapping. > > I've hacked something together where the circles are approximated by > polygons using either the axis fill method or the pylab fill function. I > select the colour by calling the get_rgba method of a ScalarMappable > object. In the following code snippet c is a tuple containg the x and y > coords of the centre of the circle, the radius, and a scalar "value" > > theta = arange(numSegs+1) * 2.0 * math.pi / numSegs > cos_theta = cos(theta) > sin_theta = sin(theta) > for c in cart: > x = c[1] + c[3] * cos_theta > y = c[2] + c[3] * sin_theta > v = c[4] > fill(x, y, facecolor=mapper.to_rgba(v), linewidth=0.5) > > It all works. However, I saw in the API documentation (and the source) > that there is a Circle object in patch. I was hoping that using this > rather than polygons would give better quality output and possibly > smaller files. Now I can instantiate it > > circle = Circle((x,y), c[3], facecolor=cmapper.to_rgba(v)) > > but can't work out what to do with it! I've tried > > ax.add_patch( circle ) > > and also > > trans = blend_xy_sep_transform( ax.transAxes, ax.transData ) > circle.set_transform( trans ) > ax.add_patch( circle ) > > Neither work. Any ideas? > > Regards, > > Andrew > > > >  > This SF.net email is sponsored by DB2 Express > Download DB2 Express C  the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > > 
From: Andrew McLean <andrewmatplotlib@an...>  20070701 23:20:53

I'm a new user of matplotlib (athough I have been using both Matlab and Python for years). I have an application where I need to display data as a set of filled circles. The centre and the radius of the circles are both specified in data coordinates. The data points have an additional scalar attribute, which is displayed using a pseudocolour mapping. I've hacked something together where the circles are approximated by polygons using either the axis fill method or the pylab fill function. I select the colour by calling the get_rgba method of a ScalarMappable object. In the following code snippet c is a tuple containg the x and y coords of the centre of the circle, the radius, and a scalar "value" theta = arange(numSegs+1) * 2.0 * math.pi / numSegs cos_theta = cos(theta) sin_theta = sin(theta) for c in cart: x = c[1] + c[3] * cos_theta y = c[2] + c[3] * sin_theta v = c[4] fill(x, y, facecolor=mapper.to_rgba(v), linewidth=0.5) It all works. However, I saw in the API documentation (and the source) that there is a Circle object in patch. I was hoping that using this rather than polygons would give better quality output and possibly smaller files. Now I can instantiate it circle = Circle((x,y), c[3], facecolor=cmapper.to_rgba(v)) but can't work out what to do with it! I've tried ax.add_patch( circle ) and also trans = blend_xy_sep_transform( ax.transAxes, ax.transData ) circle.set_transform( trans ) ax.add_patch( circle ) Neither work. Any ideas? Regards, Andrew 