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
(5) |
2
(24) |
3
(2) |
4
|
5
(4) |
6
(1) |
7
(22) |
8
(9) |
9
(23) |
10
(6) |
11
|
12
(7) |
13
(17) |
14
(12) |
15
(10) |
16
(22) |
17
(11) |
18
(6) |
19
(11) |
20
(13) |
21
(10) |
22
(7) |
23
(7) |
24
(5) |
25
(3) |
26
(20) |
27
(17) |
28
(25) |
29
(16) |
30
(17) |
31
(8) |
From: Eric F. <ef...@ha...> - 2007-03-19 17:59:20
|
Pellegrini Eric wrote: > Hi, > > I have some problems to combine a matshow object with a canvas. Here is > a little piece of code that illustrates my problem. It displays a > matshow object when pressing a button. > I would like to embed the matshow object into a canvas of a fixed > dimension. The code I wrote does the opposite i.e. it is the canvas that > adapts its size and not the matshow object. Would you have any hints ? > I suspect this problem will be solved by a change I made to svn last night, providing a matshow Axes method that you would use in place of pylab.matshow. Axes.matshow() simply makes and returns the image; it does not make a figure or set its dimensions, so you have full control over that. Eric > > ****************************************************************************** > from Tkinter import * > from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg > import pylab > > def display(): > mat = pylab.zeros((100,100)) > pylab.ioff() > image = pylab.matshow(mat) > pylab.ion() > can = FigureCanvasTkAgg(image, master=frame) > can.show() > can.get_tk_widget().grid(row = 0,column = 0) > > root = Tk() > frame = Frame(root) > frame.grid(row = 0,column = 0) > canvas = Canvas(frame, width = 240, height = 240, relief = "sunken", bg > = "white") > canvas.grid() > > button = Button(root,text="DisplayMatrix",command = display) > button.grid(row = 1,column = 0) > **************************************************************************** > > Thank you very much > > Eric > > ------------------------------------------------------------------------ > Découvrez une nouvelle façon d'obtenir des réponses à toutes vos > questions ! Profitez des connaissances, des opinions et des expériences > des internautes sur Yahoo! Questions/Réponses > <http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com>. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Victoria G. L. <la...@st...> - 2007-03-19 17:33:36
|
Thanks!! I really appreciate the fast action! Vicki Eric Firing wrote: > Victoria G. Laidler wrote: > [...] >> It would be extremely useful if xlabel, ylabel, title, and possibly >> legend could be made smart enough to attempt to call a __str__ method >> on the objects they are passed, so that xlabel(MyObject) behaves as >> intelligently as "print MyObject" does. > [...] >> Any chance of getting this implemented? > > Vicki, > > Done in svn. > > Eric >> >> Hopefully, >> Vicki Laidler, STScI |
From: Matthieu B. <mat...@gm...> - 2007-03-19 09:53:41
|
Hi, I tried it again, and now it works like charm with numpy arrays. I do not understand why it did not work before, but it works now, it's all that matters :) But 3D is another problem... Matthieu 2007/3/14, Eric Firing <ef...@ha...>: > > Matthieu Brucher wrote: > > What version of mpl are you using? > > > > > > > > The latest, I compiled it from the source as FC5 has a very old version > > - can't update myself the distribution - > > > > > > In recent versions, the collections should accept 2D numpy arrays as > > well as any sequence of tuples (and several other possibilities). > > > > > > > > For 2D plots, numpy arrays is accepted - but not for colors, it tells me > > there is a problem with tuples, I do not remember exactly, but I can > > check the error tomorrow -. > > Mathieu, > > Did you come up with a minimal example of this? If so, please send it > to me directly. I would like to follow up on it. > > Thanks. > > Eric > |
From: Pellegrini E. <eri...@ya...> - 2007-03-19 09:20:36
|
Hi, I have some problems to combine a matshow object with a canvas. Here is a little piece of code that illustrates my problem. It displays a matshow object when pressing a button. I would like to embed the matshow object into a canvas of a fixed dimension. The code I wrote does the opposite i.e. it is the canvas that adapts its size and not the matshow object. Would you have any hints ? ****************************************************************************** from Tkinter import * from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg import pylab def display(): mat = pylab.zeros((100,100)) pylab.ioff() image = pylab.matshow(mat) pylab.ion() can = FigureCanvasTkAgg(image, master=frame) can.show() can.get_tk_widget().grid(row = 0,column = 0) root = Tk() frame = Frame(root) frame.grid(row = 0,column = 0) canvas = Canvas(frame, width = 240, height = 240, relief = "sunken", bg = "white") canvas.grid() button = Button(root,text="DisplayMatrix",command = display) button.grid(row = 1,column = 0) **************************************************************************** Thank you very much Eric --------------------------------- Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses. |
From: Suresh P. <sto...@ya...> - 2007-03-19 07:39:13
|
On Sun, 18 Mar 2007, Eric Firing wrote: > One of the matshow anomalies is that it is a pylab function only instead > of a wrapper for an Axes method, so I made a new Axes.matshow(), and a > temporary matshow1() pylab function that calls it. Differences between > matshow() and matshow1(): > > 1) The latter labels the *centers* of the squares representing the > matrix elements, starting from zero. Tick values are consequently integers. > > 2) matshow1 uses the same function as matshow (figaspect()) to determine > the window dimensions, but keeps the matrix elements square when they > would be stretched in matshow. I can change this back to the matshow > behavior if desired. You may recall from our previous discussions that I would rather you not change (2) back to matshow behaviour. Although I am not sure if you say you will force the aspect ratio to be equal, or that you will preserve the aspect ratio of the matrix as specified? (As you may recall, I was unhappy with the matrix being stretched when other elements were added to the figure.) And thanks for #1. |
From: Eric F. <ef...@ha...> - 2007-03-19 07:27:11
|
Fernando Perez wrote: [...] > Frankly, I don't care how it's done: I wrote matshow long ago, back > when axis('scaled') didn't exist in the first place. If the same > result can be achieved by other means that are cleaner, I'm sure John > will accept a patch. One of the matshow anomalies is that it is a pylab function only instead of a wrapper for an Axes method, so I made a new Axes.matshow(), and a temporary matshow1() pylab function that calls it. Differences between matshow() and matshow1(): 1) The latter labels the *centers* of the squares representing the matrix elements, starting from zero. Tick values are consequently integers. 2) matshow1 uses the same function as matshow (figaspect()) to determine the window dimensions, but keeps the matrix elements square when they would be stretched in matshow. I can change this back to the matshow behavior if desired. > > All I need regularly in my work is the ability to plot a matrix such > that both the axis AND the enclosing figure (which determines the size > of the resulting EPS files for publications or talks) have the aspect > ratio of the actual matrix. How that result is achieved is really > immaterial to me. I suspect that what you would actually prefer is better automated figure sizing so that it would always nicely enclose the axes with their labels, titles, etc., correct? There is nothing magic about having the actual aspect ratio of the figure exactly match that of the axes box? (Not that I can easily achieve the nice wrapping result--this is just to clarify the ideal.) > > matshow does what I need so I use it, but I have no particular > attachment to the code other than the fact that it happens to work > correctly. That's a bonus in my book. Absolutely! Another anomaly of matshow (presently preserved in matshow1) is the returnall kwarg; this seems like the sort of thing that should either be supported by all pylab functions, or by none. The argument for none is that one can easily use gcf() and gca() to get the other two arguments. Do you want to keep the returnall kwarg? Eric |
From: <kc1...@ya...> - 2007-03-19 05:49:18
|
Thanks for the reply, Jouni.=0A=0AI am running Python 2.3 on Windows XP, la= test version of MPL.=0A=0AI'll see if I can reproduce the problem using sta= ndard examples.=0A=0A=0A=0ARegards,=0A=0A> -----Original Message-----=0A> F= rom: mat...@li... =0A> [mailto:matplotlib= -us...@li...] On =0A> Behalf Of Jouni K Sepp=E4nen= =0A> Sent: Saturday, March 17, 2007 1:06 PM=0A> To: matplotlib-users@lists.= sourceforge.net=0A> Subject: Re: [Matplotlib-users] PDF Backend problem sti= ll unresolved=0A> =0A> =0A> <kc106_2005-matplotlib@...> writes:=0A> =0A> >= > Starting with the 9th page, MPL chokes at line 1084 in =0A> > > backend_= pdf.py=0A> > Jouni posted a couple of responses witih suggestions in CVS = =0A> syntax but =0A> > I was unable to use that information.=0A> =0A> I had= to take my laptop to be to be repaired, so I can't do =0A> much work on Ma= tplotlib right now. In the meantime, please =0A> post some more information= : what version of Python and =0A> Matplotlib is this, on which platform, ca= n you reduce your =0A> code to a small example that exhibits the bug, what = output do =0A> you get with "verbose.level: debug"?=0A> =0A> --=0A> Jouni= =0A> =0A> =0A> =0A> -------------------------------------------------------= -------=0A> -----------=0A> Take Surveys. Earn Cash. Influence the Future o= f IT=0A> Join SourceForge.net's Techsay panel and you'll get the =0A> chanc= e to share your opinions on IT & business topics through =0A> brief surveys= -and earn cash =0A> http://www.techsay.com/default.php?page=3Djoin.php&p=3D= sourceforge=0A&CID=3DDEVDEV=0A_____________________________________________= __=0AMatplotlib-users mailing list Mat...@li...= =0Ahttps://lists.sourceforge.net/lists/listinfo/matplotlib-users=0A=0A =0A-= -=0AJohn Henry=0A=0A |
From: Fernando P. <fpe...@gm...> - 2007-03-19 04:00:28
|
On 1/11/07, belinda thom <bt...@cs...> wrote: > Hi, > > > With the exception of ipython -pylab, noone is forcing you to import > > *. And on the subject, Fernando, perhaps we should support a pylab > > mode in ipython which doesn't dump the pylab namespace (or maybe just > > dumps the required figure, show, close, nx), but does the interactive > > backend stuff. > > In the meantime, I did the following to my local dev copy of IPython: > Instead of the existing "import..." viq exec into user namespace, I do: > import pylab as P > import numpy as N > import matplotlib as M > > It would be nice if controlling this type of thing was configurable. It now is: set pylab_import_all 0 in your ~/.ipython/ipythonrc file, and when using -pylab, ipython will only import the names 'matplotlib' and 'pylab', but it will NOT do from pylab import * anymore. Cheers, f |
From: Fernando P. <fpe...@gm...> - 2007-03-18 23:28:59
|
On 1/26/07, Fernando Perez <fpe...@gm...> wrote: > On 1/25/07, Alan G Isaac <ai...@am...> wrote: > > On Wed, 24 Jan 2007, Fernando Perez apparently wrote: > > > Let us know if this is not enough or if you have any other issues. > > > > How about for Windows users? You list as dependencies: [...] > We obviously need to update the windows documentation... Done in SVN, thanks for reporting this. regards, f |
From: Simson G. <si...@ac...> - 2007-03-18 20:46:45
|
On Mar 18, 2007, at 12:41 PM, John Hunter wrote: > On 3/17/07, Simson Garfinkel <si...@ac...> wrote: >> Hi. I haven't been active for a while, but now I have another paper >> that I need to get out... > > Glad to have you back... Thanks. I've taken a new job, moved to california, and have been flying between the two coasts every week. It doesn't leave much time for mailing lists... > >> Anyway, I need to draw a cumulative distribution function, as the >> reviewers of my last paper really nailed me to the wall for including >> histograms instead of CDFs. Is there any way to plot a CDF with >> matplotlib? > > For analytic cdfs, see scipy.stats. I assume you need an empirical > cdf. You can use matplotlib.mlab.hist to compute the empirical pdf > (use normed=True to return a PDF rather than a frequency count). Then > use numpy.cumsum to do the cumulative sum of the pdf, multiplying by > the binsize so it approximates the integral. > > import matplotlib.mlab > from pylab import figure, show, nx > > x = nx.mlab.randn(10000) > p,bins = matplotlib.mlab.hist(x, 50, normed=True) > db = bins[1]-bins[0] > cdf = nx.cumsum(p*db) > > fig = figure() > ax = fig.add_subplot(111) > ax.bar(bins, cdf, width=0.8*db) > show() > Thanks! I'll try it out and see what happens. |
From: John H. <jd...@gm...> - 2007-03-18 16:50:23
|
On 3/18/07, Allan Noriel Estrella <all...@gm...> wrote: > I have an array of data that were sampled with a sampling rate of 1.5625 > samples/sec . I want to plot these data with the x axis showing time in > terms of hours for the major ticks and minutes for the minor ticks in my > custom made wx App. I have been fiddling around with the HourLocator and > MinuteLocator classes but it seems I can't get them to work. Do you know an > easy way to do this? I just want to plot my data in terms of the actual > time/duration of logging they represent (in hours and/or in minutes when the > plot is zoomed in or there is less than an hour's worth of samples) Well, the HourLocator, MiinuteLocator, etc are for times and not durations. If you want durations, just use plot and not plot_date. Does that help? |
From: John H. <jd...@gm...> - 2007-03-18 16:41:29
|
On 3/17/07, Simson Garfinkel <si...@ac...> wrote: > Hi. I haven't been active for a while, but now I have another paper > that I need to get out... Glad to have you back... > Anyway, I need to draw a cumulative distribution function, as the > reviewers of my last paper really nailed me to the wall for including > histograms instead of CDFs. Is there any way to plot a CDF with > matplotlib? For analytic cdfs, see scipy.stats. I assume you need an empirical cdf. You can use matplotlib.mlab.hist to compute the empirical pdf (use normed=True to return a PDF rather than a frequency count). Then use numpy.cumsum to do the cumulative sum of the pdf, multiplying by the binsize so it approximates the integral. import matplotlib.mlab from pylab import figure, show, nx x = nx.mlab.randn(10000) p,bins = matplotlib.mlab.hist(x, 50, normed=True) db = bins[1]-bins[0] cdf = nx.cumsum(p*db) fig = figure() ax = fig.add_subplot(111) ax.bar(bins, cdf, width=0.8*db) show() |
From: Allan N. E. <all...@gm...> - 2007-03-18 16:22:55
|
I have an array of data that were sampled with a sampling rate of 1.5625samples/sec . I want to plot these data with the x axis showing time in terms of hours for the major ticks and minutes for the minor ticks in my custom made wx App. I have been fiddling around with the HourLocator and MinuteLocator classes but it seems I can't get them to work. Do you know an easy way to do this? I just want to plot my data in terms of the actual time/duration of logging they represent (in hours and/or in minutes when the plot is zoomed in or there is less than an hour's worth of samples) |
From: Michael <mic...@o2...> - 2007-03-18 12:51:01
|
1.please compare figure 1 and figure 2 2 How to change text color on Pie chart ? (If fragment of Pie chart is black text is unreadable ) 3. Text "0.5%" in figure 2 is unreadable, how correct this? ( i try use pctdistance= 1.1 but if value is format autopct='%1.4f%%' some text is unreadable ) #!/usr/bin/env python from pylab import * # make a square figure and axes figure(1, figsize=(8,8)) ax = axes([0.1, 0.1, 0.8, 0.8]) labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' fracs = [50,25,24.5, 0.5] figure(1) pie(fracs, labels=labels) legend( loc='best', shadow=True) # figure(2) show a some optional features. autopct is used to label # the percentage of the pie, and can be a format string or a function # which takes a percentage and returns a string. explode is a # len(fracs) sequence which gives the fraction of the radius to # offset that slice. figure(2, figsize=(8,8)) explode=(0, 0.05, 0, 0) pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True) legend( loc='best', shadow=True) savefig('pie_demo') show() |
From: Fernando P. <fpe...@gm...> - 2007-03-17 22:20:23
|
On 3/16/07, Bill Baxter <wb...@gm...> wrote: > I guess that makes sense. > Personally I'd rather have consistency. I'm not sure why matshow() in > particular needs to have the window shape match the image shape. > > Why not just do axis('scaled') within the confines of the window you have? > Tried it out, it seems to work pretty well, and seems more consistent > with the way other things work in pylab. Well, the code you pasted doesn't seem to work correctly using current SVN (comparison between mymatshow and matshow attached). Frankly, I don't care how it's done: I wrote matshow long ago, back when axis('scaled') didn't exist in the first place. If the same result can be achieved by other means that are cleaner, I'm sure John will accept a patch. All I need regularly in my work is the ability to plot a matrix such that both the axis AND the enclosing figure (which determines the size of the resulting EPS files for publications or talks) have the aspect ratio of the actual matrix. How that result is achieved is really immaterial to me. matshow does what I need so I use it, but I have no particular attachment to the code other than the fact that it happens to work correctly. That's a bonus in my book. Cheers, f |
From: Simson G. <si...@ac...> - 2007-03-17 22:13:06
|
Hi. I haven't been active for a while, but now I have another paper that I need to get out... Anyway, I need to draw a cumulative distribution function, as the reviewers of my last paper really nailed me to the wall for including histograms instead of CDFs. Is there any way to plot a CDF with matplotlib? |
From: Eric F. <ef...@ha...> - 2007-03-17 20:52:40
|
Victoria G. Laidler wrote: [...] > It would be extremely useful if xlabel, ylabel, title, and possibly > legend could be made smart enough to attempt to call a __str__ method on > the objects they are passed, so that xlabel(MyObject) behaves as > intelligently as "print MyObject" does. [...] > Any chance of getting this implemented? Vicki, Done in svn. Eric > > Hopefully, > Vicki Laidler, STScI |
From: Jouni K <jk...@ik...> - 2007-03-17 20:05:47
|
<kc106_2005-matplotlib@...> writes: > > Starting with the 9th page, MPL chokes at line 1084 in > > backend_pdf.py > Jouni posted a couple of responses witih suggestions in CVS syntax > but I was unable to use that information. I had to take my laptop to be to be repaired, so I can't do much work on Matplotlib right now. In the meantime, please post some more information: what version of Python and Matplotlib is this, on which platform, can you reduce your code to a small example that exhibits the bug, what output do you get with "verbose.level: debug"? -- Jouni |
From: <kc1...@ya...> - 2007-03-17 17:43:03
|
Just in case my message got buried, I like to repost my message: > Now, I am running into another problem. Everything works fine up to 8 > page plots. Starting with the 9th page, MPL chokes at line 1084 in > backend_pdf.py and couldn't find the cooresponding ttf file > (VeraSe.ttf) but it had no problem reading that file for the first 8 > plots. Jouni posted a couple of responses witih suggestions in CVS syntax but I was unable to use that information. Regards, -- John Henry |
From: Scott S. <sin...@uk...> - 2007-03-17 07:49:33
|
>>> Jeff Whitaker <js...@fa...> 3/16/2007 18:30 >>> I just put a new release (0.9.5) of basemap on the sf download site. ... Windows users - please let me know if the binary installers work OK. >>> Hi Jeff, Thanks for the great toolkit. I've just downloaded, installed and tested "basemap-0.9.5.win32-py2.4.exe" using a few quick examples. It seems to work OK :) Regards, Scott P.S. It might be worth knowing that removing basemap-0.9.4 broke my install of your grib2 library, which relied on 'pyproj.pyd' being visible to Python in the 'Lib\site-packages' directory, rather than being renamed '_pyproj.pyd' and moved to 'Lib\site-packages\matplotlib\toolkits\basemap' as it is now. Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/ |
From: Bill B. <wb...@gm...> - 2007-03-17 05:51:46
|
On 3/17/07, Bill Baxter <wb...@gm...> wrote: A pox on matplotlib's default reply-to-sender! Resending my reply that went to Fernando alone below. > On 3/17/07, Fernando Perez <fpe...@gm...> wrote: > > On 3/16/07, Bill Baxter <wb...@gm...> wrote: > > > Why does pylab.matshow() create a new figure by default when no other > > > standard pylab function I know of does that? It seems very > > > inconsistent for no particular gain, since as always > > > figure();matshow(m) will achieve that result if that is what is > > > desired. > > > > No: matshow has to create a figure with a non-standard size so that > > the final figure has the same aspect ratio as the array being > > displayed. If you call figure() first, the figure has already been > > created. > > > > The code: > > > > # Extract actual aspect ratio of array and make appropriately sized figure > > w,h = figaspect(arr) > > fig = figure(fignum,figsize=(w,h)) > I guess that makes sense. Personally I'd rather have consistency. I'm not sure why matshow() in particular needs to have the window shape match the image shape. Why not just do axis('scaled') within the confines of the window you have? Tried it out, it seems to work pretty well, and seems more consistent with the way other things work in pylab. def mymatshow(*args,**kw): """Display an array as a matrix in a new figure window. The origin is set at the upper left hand corner and rows (first dimension of the array) are displayed horizontally. The aspect ratio of the figure window is that of the array, as long as it is possible to fit it within your screen with no stretching. If the window dimensions can't accomodate this (extremely tall/wide arrays), some stretching will inevitably occur. Tick labels for the xaxis are placed on top by default. matshow() calls imshow() with args and **kwargs, but by default it sets interpolation='nearest' (unless you override it). All other arguments and keywords are passed to imshow(), so see its docstring for further details. Special keyword arguments which are NOT passed to imshow(): - fignum(None): by default, matshow() creates a new figure window with automatic numbering. If fignum is given as an integer, the created figure will use this figure number. Because of how matshow() tries to set the figure aspect ratio to be the one of the array, if you provide the number of an already existing figure, strange things may happen. - returnall(False): by default, the return value is a figure instance. With 'returnall=True', a (figure, axes, image) tuple is returned. Example usage: def samplemat(dims): aa = zeros(dims) for i in range(min(dims)): aa[i,i] = i return aa dimlist = [(12,12),(128,64),(64,512),(2048,256)] for d in dimlist: fig, ax, im = matshow(samplemat(d)) show() """ # Preprocess args for our purposes arr = asarray(args[0]) # Extract unique keywords we can't pass to imshow kw = kw.copy() fignum = popd(kw,'fignum',None) retall = popd(kw,'returnall',False) # Extract actual aspect ratio of array and make appropriately sized figure w,h = figaspect(arr) #fig = figure(fignum,figsize=(w,h)) fig = gcf() cla() ax = fig.add_axes([0.15, 0.09, 0.775, 0.775]) axis('scaled') ax.xaxis.tick_top() ax.title.set_y(1.05) # raise it up a bit for tick top kw['aspect'] = 'auto' # imshow call: use 'lower' origin (we'll flip axes later) kw['origin'] = 'lower' # Unless overridden, don't interpolate kw.setdefault('interpolation','nearest') # All other keywords go through to imshow. im = ax.imshow(*args,**kw) gci._current = im # set the x and y lim to equal the matrix dims nr,nc = arr.shape[:2] ax.set_xlim((0,nc)) ax.set_ylim((nr,0)) draw_if_interactive() if retall: return fig, ax, im else: return fig --bb |
From: Fernando P. <fpe...@gm...> - 2007-03-17 04:31:44
|
On 3/16/07, Bill Baxter <wb...@gm...> wrote: > Why does pylab.matshow() create a new figure by default when no other > standard pylab function I know of does that? It seems very > inconsistent for no particular gain, since as always > figure();matshow(m) will achieve that result if that is what is > desired. No: matshow has to create a figure with a non-standard size so that the final figure has the same aspect ratio as the array being displayed. If you call figure() first, the figure has already been created. The code: # Extract actual aspect ratio of array and make appropriately sized figure w,h = figaspect(arr) fig = figure(fignum,figsize=(w,h)) Cheers, f |
From: Bill B. <wb...@gm...> - 2007-03-17 04:13:43
|
Why does pylab.matshow() create a new figure by default when no other standard pylab function I know of does that? It seems very inconsistent for no particular gain, since as always figure();matshow(m) will achieve that result if that is what is desired. --bb |
From: Ryan K. <rya...@gm...> - 2007-03-17 02:05:27
|
Thanks for the help Ken. I think I got it. The source install of libwkgtk2.6 doesn't seem to be enough (I still get the message about accelerator needing the headers). I have downloaded the 2.6 source tarball (thanks for finding it). I copied *.h from the wxPython-src-2.6.3.3/wxPython/include/wx/wxPython directory of the tarball to /usr/include/wx/wxPython. The message went away. I think that was all I needed to do. Ryan On 3/16/07, Ken McIvor <mc...@ii...> wrote: > Ryan, > > I found the 2.6 sources: > > http://wxpython.sourceforge.net/download-2.6.3.3.php > > Ken > |
From: Ken M. <mc...@ii...> - 2007-03-16 18:08:17
|
Ryan, I found the 2.6 sources: http://wxpython.sourceforge.net/download-2.6.3.3.php Ken |