You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
(13) |
2
(3) |
3
(4) |
4
(24) |
5
(12) |
6
(11) |
7
(14) |
8
(17) |
9
(3) |
10
(5) |
11
(23) |
12
(7) |
13
(9) |
14
(17) |
15
(1) |
16
(2) |
17
(2) |
18
(11) |
19
(14) |
20
(9) |
21
(13) |
22
(12) |
23
(1) |
24
|
25
(7) |
26
(11) |
27
(20) |
28
(19) |
29
(11) |
30
(1) |
From: Matthieu B. <mat...@gm...> - 2007-06-28 10:02:26
|
> > I want to do some matrix operations, like a singular value decomposition > (svd) or to calculate random number from the multivariate_normal > distributions. These two functions exist in 'numeric', but I cannot use them > (they hang up or give some errors). > Maybe there is any package to download that is compatible with the current > numpy/pylab/matplotlib specifications? Or any other simple way to deal with > such matrix operations? That would be very helpful... > Linear algebra (svd) can be found in numpy.linalg and random numbers can be generated with the numpy.random module. Matthieu |
From: Alexander D. <Ale...@as...> - 2007-06-28 09:58:07
|
Hi, I hope this is the right place to post this question, which is related to numpy, or numeric or something else... I want to do some matrix operations, like a singular value decomposition (svd) or to calculate random number from the multivariate_normal distributions. These two functions exist in 'numeric', but I cannot use them (they hang up or give some errors). Maybe there is any package to download that is compatible with the current numpy/pylab/matplotlib specifications? Or any other simple way to deal with such matrix operations? That would be very helpful... Thanks Alex |
From: Volker L. <lor...@ph...> - 2007-06-28 08:37:49
|
Hi Dave, this is in fact simple as most things in the world, allthough finding the solution could be soooo hard ;) >>> title('This is the first line\n second:line') volker > Message: 4 > Date: Wed, 27 Jun 2007 15:02:51 -0600 > From: David D Clark <dd...@la...> > Subject: [Matplotlib-users] multiple line title > To: mat...@li... > Message-ID: <468...@la...> > Content-Type: text/plain; charset=ISO-8859-1 > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello Folks, > > Is there a way to make a multiple line title? I have looked through the > documentation and googled, but have not found an answer. I would like > something that looks like this > > This is the first line > second:line > > Thanks, > Dave > - -- > David D. Clark > Electrical Engineer > P-23, Neutron Science and Technology > e-mail mailto:dd...@la... > GPG Public key 0x018D6523 available at http://www.us.pgp.net > http://www.gnupg.org has information about public key cryptography > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFGgtB6Nu7GcwGNZSMRAqHOAKCvb1Km0EqjClU/Za/bsEI2xmnETgCgsmtI > sWKt0+VAu16xCtWZTaeiPV4= > =AG8W > -----END PGP SIGNATURE----- |
From: David C. <da...@ar...> - 2007-06-28 07:15:19
|
Hi, Is there a simple way to tighten the bounding box of a figure while exporting to eg png or pdf ? For now, I am modifying the bounding box directly in the files, which is far from optimal. I would like to get less space between the bounding box and the axis when using subplot. cheers, David |
From: Edin S. <edi...@gm...> - 2007-06-28 04:33:54
|
Hi Steve, On 6/27/07, Steve Sweet <sw...@sf...> wrote: > Hi, > > I've installed matplotlib-0.90.1 on a Centos 5.0 box (Centos is > identical to RedHat Enterprise). One of my users is running a script > that previously worked with matplotlib on another system. I'm seeing > the following errors > [Wed Jun 27 12:25:17 2007] [error] [client 10.0.0.92] PythonHandler > cv_wms: KeyError: 'mathtext.mathtext2' > > I've done a bit of snooping through the code and I searched the mailing > list archive. I saw a message relating to matplotlib-0.87 indicating > that the missing key needed to be added to the matplotlibrc file. > However when I do so I get this message: > [Wed Jun 27 12:17:35 2007] [error] [client x.x.x.x] Bad key > "mathtext.mathtext2" on line 260 in > [Wed Jun 27 12:17:35 2007] [error] [client x.x.x.x] > /var/www/.matplotlib/matplotlibrc. > > When I remove the offending key I am back to the first error. I am > using the matplotlibrc file that came with the 0.90.1 tarball. Does > anyone have any suggestions? > > Thanks. It seems like you have another (older) installation of matplotlib somewhere on that system. Note that newer matplotlibs don't even require a matplotlibrc file in the $HOME/.matplotlib dir. Have you tried removing it completely? If you still have problems, please post some more info. Edin |
From: Jason A. <jra...@gm...> - 2007-06-28 03:48:18
|
Thanks John and Angus. I can't wait to try out your recommendations. I'm upgrading my system at the moment, so I'm not able to try them out just now. It is promising that matplotlib seems to be able to handle this pretty easily. |
From: Nicolas <nic...@ya...> - 2007-06-27 22:20:39
|
Hi, I would like to export a zone of a Figure in .png. Something like figure.savefig("mypicture.png", box = (0,0,5,5)) How may I proceed, without drawing all the plots again ? I use wxagg. Thanks, Nicolas --------------------------------- Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |
From: David D C. <dd...@la...> - 2007-06-27 21:52:06
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Fred, That did the trick. I thought I had tried that and it failed. I must have made a typo. Thanks, Dave fred wrote: > David D Clark a écrit : >> Is there a way to make a multiple line title? I have looked through the >> documentation and googled, but have not found an answer. I would like >> something that looks like this >> >> This is the first line >> second:line >> > title('This is the first line\nsecond:line') ? > - -- David D. Clark Electrical Engineer P-23, Neutron Science and Technology ph. 505.667.4147 fx. 505.665.4121 pg. 505.996.1416 e-mail mailto:dd...@la... GPG Public key 0x018D6523 available at http://www.us.pgp.net http://www.gnupg.org has information about public key cryptography -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGgtv5Nu7GcwGNZSMRAudZAJ9Vj4bXb1iPHhryOg7FYYCS9cKfTwCeJQMJ +lJdVeHtBy3wfcerDVxtLWY= =JgS8 -----END PGP SIGNATURE----- |
From: fred <fr...@gm...> - 2007-06-27 21:38:31
|
David D Clark a écrit : > Is there a way to make a multiple line title? I have looked through the > documentation and googled, but have not found an answer. I would like > something that looks like this > > This is the first line > second:line > title('This is the first line\nsecond:line') ? -- http://scipy.org/FredericPetit |
From: David D C. <dd...@la...> - 2007-06-27 21:03:01
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Folks, Is there a way to make a multiple line title? I have looked through the documentation and googled, but have not found an answer. I would like something that looks like this This is the first line second:line Thanks, Dave - -- David D. Clark Electrical Engineer P-23, Neutron Science and Technology e-mail mailto:dd...@la... GPG Public key 0x018D6523 available at http://www.us.pgp.net http://www.gnupg.org has information about public key cryptography -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGgtB6Nu7GcwGNZSMRAqHOAKCvb1Km0EqjClU/Za/bsEI2xmnETgCgsmtI sWKt0+VAu16xCtWZTaeiPV4= =AG8W -----END PGP SIGNATURE----- |
From: Steve S. <sw...@sf...> - 2007-06-27 20:33:06
|
Hi, I've installed matplotlib-0.90.1 on a Centos 5.0 box (Centos is identical to RedHat Enterprise). One of my users is running a script that previously worked with matplotlib on another system. I'm seeing the following errors [Wed Jun 27 12:25:17 2007] [error] [client 10.0.0.92] PythonHandler cv_wms: KeyError: 'mathtext.mathtext2' I've done a bit of snooping through the code and I searched the mailing list archive. I saw a message relating to matplotlib-0.87 indicating that the missing key needed to be added to the matplotlibrc file. However when I do so I get this message: [Wed Jun 27 12:17:35 2007] [error] [client x.x.x.x] Bad key "mathtext.mathtext2" on line 260 in [Wed Jun 27 12:17:35 2007] [error] [client x.x.x.x] /var/www/.matplotlib/matplotlibrc. When I remove the offending key I am back to the first error. I am using the matplotlibrc file that came with the 0.90.1 tarball. Does anyone have any suggestions? Thanks. |
From: darkside <in....@gm...> - 2007-06-27 17:55:08
|
Hello, I don't know what I'm doing wrong, but it don't work for me. I have to open different sets of data, plot it, select an initial point, make some calculations and save all the data. Each plot have a diferente initial point, so I thought of do this with a fo= r sentences, opening each plot, doing all and so on. But I open the first one, and then it plots the second one, but don't let m= e select the original point, it catches the previos one. And the same for the rest. And I don't know why it doesn't work. Here you have all the program: -------------------------- #!/usr/bin/python # -*- encoding: latin1 -*- #Importamos los m=F3dulos necesarios: import Numeric as num import pylab import random import array import sys from matplotlib.widgets import SpanSelector from matplotlib.widgets import Cursor #Leemos el fichero que contiene el valor de la energia y la suma de los espines: def readfiles(filename): """ Lee el fichero donde estan los datos. La primera fila del fichero nos d= a la temperatura y el numero de puntos. Las dos columnas tienen la energia y la suma de los spines. """ fin =3D open (filename, 'r') fields =3D fin.readline() fin.close() labels =3D fields[1:].split() t =3D eval(labels[1]) n =3D eval(labels[6]) datos =3D pylab.load(filename,comments=3D'#') energia =3Ddatos[:,0] sumspines =3Ddatos[:,1] return t, n, energia, sumspines def filelist(filename): fin =3D open(filename,'r') files =3D [] for line in fin: files.append(line[:-1]), return files def writefile(filename,start,cv,mag,t): """ Escribimos en un fichero todos los datos de punto de corte, calores especificos, magnetizacion y temperatura """ fout =3D open(filename,'w') fout.write ("#punto de corte cv magnetizacion temperatura"= ) for i in range (len(start)): fout.write("%f \t %f \t %f \t %f \n" % (start[i],cv[i], mag[i], t[i])) fout.close() def cv(energia,T,n,g,start): """ Calculamos el calor espec=EDfico segun la formula: Cv=3D k*B**2/(nx*ny)*(<H=B2> - <H>=B2 donde: <H>=B2 =3D (sumatorio H/n) **2 <H=B2> =3D (sumatorio H) **2 /n """ hp =3D sum(energia[start:])/(n*g*g*2.) energia2 =3D num.asarray(energia) hp2 =3D sum(energia2[start:]**2)/n*(g*g*2)**2 # print 'Algunos valores de la energia: ',energia[start:start+10] return (hp2-hp**2)/(g*g*T**2) def mag(sumspines,n,g,start): """ Calculamos la magnetizacion, usando la formula: <M> =3D (sumatorio S) /n """ # print 'Algunos valores de sumspines: ', sumspines[start:start+10] # print 'la n es: ', n return sum(sumspines[start:]) /(n*g*g) def grid(zn): im1 =3D pylab.imshow(zn, cmap=3Dpylab.cm.gray, interpolation=3D'nearest= ') pylab.show() def plotear(energia): fig=3Dpylab.figure(figsize=3D(8,6)) ax =3D fig.add_subplot(111) x=3Dpylab.arange(0,len(energia),1) ax.plot(x,energia,linewidth=3D2) pylab.grid(True) cursor =3D Cursor(ax, useblit=3DFalse, color=3D'red', linewidth=3D2) cursor.horizOn =3D False def click(event): global x #x,y =3D event.x,event.y if event.button =3D=3D 1: if event.inaxes: # print 'coordenada x', event.xdata x =3D event.xdata pylab.disconnect(cid) pylab.close() return x def main0 (): global cid filename =3D raw_input("Introduce el fichero de datos: ") # t=3D temperatura # n=3D numero de pasos # energia =3D valores de la energia, sin normalizar (hay que multiplicar po= r # 1/( 2*nx*ny) # sumspines=3D valor de la suma de los espines para cada energia # g =3D grid (nx =3Dny) t, n, energia, sumspines =3D readfiles(filename) g =3D float(filename[(filename.find('-')+1):]) plotear(energia) cid =3D pylab.connect('button_press_event', click) pylab.show() x1 =3D int(x) print 'Coordenada x: ',x1 print 'El calor especifico es: ',cv(energia,t, n,g,x1) print 'La magnetizacion es: ', mag(sumspines,n,g,x1) def main1(): global x, cid filename =3D raw_input("Introduce el fichero con la lista: ") files =3D filelist(filename) start=3D[] cvall=3D[] magall=3D[] ts=3D[] for i in range(len(files)): t,n,energia,sumspines=3D readfiles(files[i]) g =3D float(files[1][(files[1].find('-')+1):]) plotear(energia) cid =3D pylab.connect('button_press_event', click) pylab.show() x1 =3D int(x) start.append(x1) cv1=3Dcv(energia,t, n,g,start[i]) mag1=3D mag(sumspines,n,g,start[i]) cvall.append(cv1) magall.append(mag1) ts.append(t) print 'Coordenada x: ',x1 print 'El calor especifico es: ',cv1 print 'La magnetizacion es: ', mag1 filename2=3D'resultados_globales.%s' % (g) writefile(filename2,start,cvall,magall,ts) def main2(): print "todavia no esta hecho" if __name__ =3D=3D "__main__": print "Selecciona una de las siguientes opciones: \n " print "Un solo fichero de datos (0)" print "Lista de ficheros de datos (1)" print "Lista de ficheros de datos y valores de corte (2)" option =3D input() if option =3D=3D0: main0() if option =3D=3D 1: main1() if option =3D=3D2: main2() ------------------------------------- 2007/6/27, Matthias Michler <Mat...@gm...>: > > Hello darkside, > > I'm a little confused that you are sending the email directly to me ... > and I'm not sure I really understand your problem, but I set up an exampl= e > that hopefully satify your needs and shows that it works in principle : > > >------------------------------------------------------------------------= ----------------------------------- > import pylab > > def click(event): > global x # allow to change global variable > if event.button =3D=3D 1: > if event.inaxes: > x =3D event.xdata # change global variable > print " x - intern =3D ", x > pylab.disconnect(cid) > pylab.close() > > xlist =3D [] # list for x values > global x > for i in xrange(8): > pylab.figure() > pylab.subplot(111) > pylab.draw() > cid =3D pylab.connect('button_press_event', click) > pylab.show() > print " x - extern =3D ", x > xlist.append(x) > > pylab.figure() > pylab.subplot(111) > pylab.plot(xlist, 'b+', ms=3D8, mew=3D4) # plot ensemble of x values > pylab.show() > > >------------------------------------------------------------------------= ------------------- > > If this example is not sufficient for you, please set up a little example > of > your problem, which can be executed from here, too. > This you may send to mpl mailing-list. I have already tried this example and it doesn't work for me. It catches the same x for all the plots. Thank you for you kind help. P.D. I send the previous message to you because I clicked the reply button and I didn't see that it was only you, sorry. |
From: Brian T.N. G. <gu...@ll...> - 2007-06-27 16:48:52
|
On Wed, Jun 27, 2007 at 11:40:39AM -0500, John Hunter wrote: > On 6/27/07, Brian T.N. Gunney <gu...@ll...> wrote: > > ># Process key presses. > >def on_key(event): > > if event.key=='w': > > # Close current window. > > # How do we control which window gets closed? > > close() > > The event has a canvas attribute, which is the figure canvas that > contains the figure, so you should be able to do > > close(event.canvas.figure) That is exactly what I need. Thank you. Brian |
From: John H. <jd...@gm...> - 2007-06-27 16:40:43
|
On 6/27/07, Brian T.N. Gunney <gu...@ll...> wrote: > # Process key presses. > def on_key(event): > if event.key=='w': > # Close current window. > # How do we control which window gets closed? > close() The event has a canvas attribute, which is the figure canvas that contains the figure, so you should be able to do close(event.canvas.figure) |
From: Andrew S. <str...@as...> - 2007-06-27 16:34:08
|
Hi Tocer, Thanks for the patch to matplotlib/__init__.py. I changed an obvious issue ('.nil' to '.nib'), but otherwise committed it as-is. Can you (or Werner, who was also having this issue) test the current svn version (>=3418) and report back? Cheers! Andrew tocer wrote: > Hi, matplotlib developer > > You know there is a bug about get_py2exe_datafiles in MPL0.90.1. I > think I fix it below. > > ------------------------- matplotlib/__init__.py ------------------ > > > def get_py2exe_datafiles(): datapath = get_data_path() head, tail = > os.path.split(datapath) d = {} for root, dirs, files in > os.walk(datapath): # Need to explicitly remove cocoa_agg files or > py2exe complains # NOTE I dont know why, but do as previous version > if 'Matplotlib.nib' in files: files.remove('Matplotlib.nil') files = > [os.path.join(root, filename) for filename in files] root = > root.replace(tail, 'matplotlibdata') root = > root[root.index('matplotlibdata'):] d[root] = files return d.items() > > ----------------------------- end --------------------------------- > > > > and the sample of setup.py is below: > > ----------------- setup.py sample ----------------------- > > from distutils.core import setup import py2exe > > import matplotlib > > dist_dir = r'r:\matplotlib_dist_dir' setup( > console=['simple_demo.py'], options={ 'py2exe': { 'packages' : > ['matplotlib', 'pytz'], 'dist_dir': dist_dir } }, > data_files=matplotlib.get_py2exe_datafiles() ) > > it work well in my box. > > -- Tocer > > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------- > 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/ > > > ------------------------------------------------------------------------ > > > _______________________________________________ Matplotlib-users > mailing list Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Matthias M. <Mat...@gm...> - 2007-06-27 16:19:37
|
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 <Mat...@gm...> wrote: > > > By the way: What do you think about the "insert a 'l' or 'g' into your > > > TextBox and get a grid or log-scale"-issue? Is there a possibility to > > > switch the mpl-meaning 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: Ryan K. <rya...@gm...> - 2007-06-27 16:03:40
|
Sorry, forgot to copy the list. On 6/27/07, Ryan Krauss <rya...@gm...> wrote: > I think what you are asking is how to make mpl plot different line > types in colors and styles that are easily distinguishable when > plotted in grayscale. I had tinkered with this a bit in the past and > the final suggestion was to write some helper functions so that I > could do the following: > > from mycyclers import colorcycler, linecycler > > for data in mydata: > ax.plot(data, linestyle=linecycler(), color=colorcycler()) > > so that by writing a linecycler function I could control the line > types plotted each time and the same with the color. Color would be > specified as a grayscale such as '#808080' for a medium gray or > '#000000' for black. > > I didn't actually do it this way or I would post the code (I was in a > hurry and did something hackish). I think that linecycler and > colorcycler would be helper classes thta increment there own internal > count when called and return a linestyle or color. > > I think what you want in the end is a simple way to do this: > > t=arange(0,1,0.01) > y=sin(2*pi*t) > x=cos(2*pi*t) > plot(t,x,color='#000000',linestyle='-') > plot(t,y,color='#808080',linestyle=':') > > where color and line style would increment pseudo-automatically > through lists you have defined and that you like. > > A slightly better approach might be: > t=arange(0,1,0.01) > y=sin(2*pi*t) > x=cos(2*pi*t) > data=[x,y] > mycolors=['#000000','#808080'] > mytypes=['-',':'] > > def grayscaleplot(data,t): > for n,item in enumerate(data): > plot(t,item, color=mycolors[n], linestyle=mytypes[n]) > > FWIW, > > Ryan > > > On 6/27/07, Emmanuel Favre-Nicolin <man...@gm...> wrote: > > Hi, > > > > I didn't find any tip for preparation of simple black and white 2D plot, > > especially for nice output in eps for publication. > > > > Any suggestions are welcome. > > > > > > > > > > ------------------------------------------------------------------------- > > 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/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > |
From: Brian T.N. G. <gu...@ll...> - 2007-06-27 15:52:59
|
On Wed, Jun 27, 2007 at 09:16:09AM -0500, John Hunter wrote: > On 6/26/07, Brian T.N. Gunney <gu...@ll...> wrote: > >I have a matplotlib script that generates several figures. > >When a figure receives an event, how do I know which figure > >it did it? For example, the key event 'w' is meant to close > >the figure, but so far, I have no way to control which figure > >gets closed. > > All events are connected to figures by definition -- the figure is > placed inside a GUI canvas and that is what manages the events. The > pylab connect function is just a thing wrapper to the canvas > mpl_connection function. pylab's connect just grabs the current > figure with "gcf" and makes the call fig.canvas.mpl_connect > > So in matplotlib, events do not make since w/o reference to specific > figures. That makes sense. However, it's not clear to me which figure is to be the "current" figure. It does not appear to be the figure where the event occured. > > > >In the pick_event_demo.py example, each figure is connected > >to an event handler specific to it. I think this wouldn't > >work in my case because I don't know how many figures I'd > >have until I process some data. > > I don't see why this is a problem -- just set up the connections when It's a problem because the number of figures is variable. I don't know how many call-back functions to define when I write the script. > you create the figure as you process the data. You'll probably need > to post an example if you have further troubles, because it is hard to > advise in the abstract. Ok. Here is an example. Run this and type 'w' in window 0. You should expect figure 0 to be closed, but instead, figure 2 is closed. #!/usr/bin/env python import sys from pylab import * # This is meant to illustrate that the number of figures is # unknown until run time. if len(sys.argv) > 1: nfigs = int(sys.argv[1]) else: nfigs = 3 # Process key presses. def on_key(event): if event.key=='w': # Close current window. # How do we control which window gets closed? close() elif event.key=='q': # Exit. sys.exit(0) # Generate as many figures as specified on command line. for i in range(nfigs): figure(i) title( str(i) ) plot(range(i+2)) connect('key_press_event', on_key) show() Thanks for helping. Brian |
From: John H. <jd...@gm...> - 2007-06-27 14:16:15
|
On 6/26/07, Brian T.N. Gunney <gu...@ll...> wrote: > I have a matplotlib script that generates several figures. > When a figure receives an event, how do I know which figure > it did it? For example, the key event 'w' is meant to close > the figure, but so far, I have no way to control which figure > gets closed. All events are connected to figures by definition -- the figure is placed inside a GUI canvas and that is what manages the events. The pylab connect function is just a thing wrapper to the canvas mpl_connection function. pylab's connect just grabs the current figure with "gcf" and makes the call fig.canvas.mpl_connect So in matplotlib, events do not make since w/o reference to specific figures. > In the pick_event_demo.py example, each figure is connected > to an event handler specific to it. I think this wouldn't > work in my case because I don't know how many figures I'd > have until I process some data. I don't see why this is a problem -- just set up the connections when you create the figure as you process the data. You'll probably need to post an example if you have further troubles, because it is hard to advise in the abstract. JDH |
From: John H. <jd...@gm...> - 2007-06-27 13:55:03
|
On 6/27/07, John Hunter <jd...@gm...> wrote: > Here is a simple example showing how to do this -- we could add > support for this in a built-in function. It would be nice if we > encapsulated the scroll mouse in our event handling, since the scroll > is the natural way to browse these images I just added a scroll_event to backend bases -- it fires a mouse event setting the button attribute to either 'up' or 'down' and added this example to examples/image_slices_viewer.py Developers who use/develop other backends -- if you get a minute it would be nice to connect up your backend to the new scroll_event. See backend_gtk.py for example code Thanks, JDH |
From: John H. <jd...@gm...> - 2007-06-27 13:38:05
|
On 6/26/07, Jason Addison <jra...@gm...> wrote: > I would like to view a 3D array (or a python list of 2D arrays) as a > sequence of images using something like imshow. For example, something > like this: > > imshow(rand(6,12,12), imagecube=true) Here is a simple example showing how to do this -- we could add support for this in a built-in function. It would be nice if we encapsulated the scroll mouse in our event handling, since the scroll is the natural way to browse these images from pylab import figure, show class IndexTracker: def __init__(self, ax, X): self.ax = ax ax.set_title('use left mouse to advance, right to retreat') self.X = X rows,cols,self.slices = X.shape self.ind = self.slices/2 self.im = ax.imshow(self.X[:,:,self.ind]) self.update() def onpress(self, event): if event.button==1: self.ind = numpy.clip(self.ind+1, 0, self.slices-1) elif event.button==3: self.ind = numpy.clip(self.ind-1, 0, self.slices-1) print event.button, self.ind self.update() def update(self): self.im.set_data(self.X[:,:,self.ind]) ax.set_ylabel('slice %s'%self.ind) self.im.axes.figure.canvas.draw() fig = figure() ax = fig.add_subplot(111) X = numpy.random.rand(20,20,40) tracker = IndexTracker(ax, X) fig.canvas.mpl_connect('button_press_event', tracker.onpress) show() |
From: massimo s. <mas...@un...> - 2007-06-27 12:50:01
|
Emmanuel Favre-Nicolin ha scritto: > Hi, > > I didn't find any tip for preparation of simple black and white 2D plot, > especially for nice output in eps for publication. > > Any suggestions are welcome. I don't get it. What kind of tips do you need? How to change the plot colour? m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: mas...@un... tel: +39-051-2094388 fax: +39-051-2094387 |
From: Emmanuel Favre-N. <man...@gm...> - 2007-06-27 12:36:35
|
Hi, I didn't find any tip for preparation of simple black and white 2D plot, especially for nice output in eps for publication. Any suggestions are welcome. |
From: tocer <toc...@gm...> - 2007-06-27 06:22:35
|
Hi, matplotlib developer You know there is a bug about get_py2exe_datafiles in MPL0.90.1. I think I fix it below. ------------------------- matplotlib/__init__.py ------------------ def get_py2exe_datafiles(): datapath = get_data_path() head, tail = os.path.split(datapath) d = {} for root, dirs, files in os.walk(datapath): # Need to explicitly remove cocoa_agg files or py2exe complains # NOTE I dont know why, but do as previous version if 'Matplotlib.nib' in files: files.remove('Matplotlib.nil') files = [os.path.join(root, filename) for filename in files] root = root.replace(tail, 'matplotlibdata') root = root[root.index('matplotlibdata'):] d[root] = files return d.items() ----------------------------- end --------------------------------- and the sample of setup.py is below: ----------------- setup.py sample ----------------------- from distutils.core import setup import py2exe import matplotlib dist_dir = r'r:\matplotlib_dist_dir' setup( console=['simple_demo.py'], options={ 'py2exe': { 'packages' : ['matplotlib', 'pytz'], 'dist_dir': dist_dir } }, data_files=matplotlib.get_py2exe_datafiles() ) it work well in my box. -- Tocer |
From: Angus M. <am...@gm...> - 2007-06-27 02:49:17
|
Hi Jason, On 27/06/07, Jason Addison <jra...@gm...> wrote: > I would like to view a 3D array (or a python list of 2D arrays) as a > sequence of images using something like imshow. For example, something > like this: <snip> > Are there other packages that do this? I have written an image browser module that does something similar to what you're trying to do. It's still quite rudimentary, and I hadn't really planned on sharing it in its current state, but it may be that you can find some useful ideas in the code. The image browser is a matplotlib canvas embedded in a wx window, and I use the WxAgg backend - I've no idea how that will change things from your setup. I run it interactively from ipython -pylab as shown below. Usage is pretty simple: In [1]: import pyvis In [2]: pv = pyvis.pyvis() In [3]: pv.AddImg(arange(10000).reshape(100,100), 'my gradient') then play around with the menus. More than one image can be loaded at a time. Feel free to use the code as you like. Angus. -- AJC McMorland, PhD Student Physiology, University of Auckland |