You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(15) |
Sep
(21) |
Oct
(15) |
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(7) |
Feb
(6) |
Mar
(2) |
Apr
(5) |
May
(6) |
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(3) |
Oct
(14) |
Nov
(16) |
Dec
(10) |
2004 |
Jan
(5) |
Feb
(10) |
Mar
(4) |
Apr
(8) |
May
(1) |
Jun
(5) |
Jul
(5) |
Aug
(4) |
Sep
(10) |
Oct
(3) |
Nov
(4) |
Dec
|
2005 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(15) |
May
(12) |
Jun
(1) |
Jul
(4) |
Aug
(3) |
Sep
(6) |
Oct
(7) |
Nov
(21) |
Dec
(11) |
2006 |
Jan
(16) |
Feb
(12) |
Mar
(4) |
Apr
(6) |
May
(5) |
Jun
(9) |
Jul
|
Aug
(5) |
Sep
(1) |
Oct
(10) |
Nov
(4) |
Dec
(3) |
2007 |
Jan
(6) |
Feb
(4) |
Mar
(6) |
Apr
(11) |
May
(1) |
Jun
(21) |
Jul
|
Aug
(6) |
Sep
(2) |
Oct
(4) |
Nov
|
Dec
|
2008 |
Jan
(14) |
Feb
(1) |
Mar
(5) |
Apr
(22) |
May
(4) |
Jun
(1) |
Jul
(7) |
Aug
(5) |
Sep
(7) |
Oct
(3) |
Nov
|
Dec
(1) |
2009 |
Jan
(14) |
Feb
(1) |
Mar
(9) |
Apr
(5) |
May
(6) |
Jun
(7) |
Jul
(8) |
Aug
(3) |
Sep
|
Oct
|
Nov
(2) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
|
Mar
(6) |
Apr
(6) |
May
(34) |
Jun
|
Jul
(8) |
Aug
(3) |
Sep
|
Oct
(5) |
Nov
(3) |
Dec
(1) |
2011 |
Jan
|
Feb
(4) |
Mar
(3) |
Apr
|
May
|
Jun
(5) |
Jul
(9) |
Aug
(5) |
Sep
(9) |
Oct
(3) |
Nov
(10) |
Dec
(1) |
2012 |
Jan
(1) |
Feb
(3) |
Mar
(2) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(3) |
Nov
(2) |
Dec
(9) |
2014 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2016 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael H. <mh...@al...> - 2005-11-07 10:58:33
|
Noel O'Boyle wrote: > It seems that at the moment, it is only possible to save images as .ps. > This is a problem for any Python programs that want to display the image > (e.g. using Tkinter). > > Would it be difficult to add .png support? It is already possible to use g.hardcopy(filename='myfile.png', terminal='png') with some other option possibilities (fontsize, monochrome, etc) defined in termdefs.py within terminal_opts['png']. Is this what you need? Michael |
From: Nadav H. <Na...@Vi...> - 2005-11-07 10:03:31
|
Either go back to version 1.6 of browse in this mailing list, there is a line that you can change in the configuration that solve this issue on some occasions. The problem of mouse interactions of gnuplot4 through gnuplot-py raised more then once. Nadav. Will Muir wrote: >How can I make the mouse zoom feature work through the python interface >as it does when a just run gnuplot stand alone. > >Will > > > >------------------------------------------------------- >SF.Net email is sponsored by: >Tame your development challenges with Apache's Geronimo App Server. Download >it for free - -and be entered to win a 42" plasma tv or your very own >Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >_______________________________________________ >Gnuplot-py-users mailing list >Gnu...@li... >https://lists.sourceforge.net/lists/listinfo/gnuplot-py-users > > > |
From: Noel O'B. <no...@ca...> - 2005-11-07 09:53:32
|
It seems that at the moment, it is only possible to save images as .ps. This is a problem for any Python programs that want to display the image (e.g. using Tkinter). Would it be difficult to add .png support? Regards, Noel. |
From: Noel O'B. <no...@ca...> - 2005-11-07 09:12:01
|
Dear all, Please find attached a patch for the following problem: Problem: On Windows, if your user name contains an apostrophe, the use of temporary files causes an error, as gnuplot uses apropostrophes (i.e. single quotes) to delimit the filename. gnuplot> plot 'c:\docume~1\noelo'~1\locals~1\temp\tmpcxnwsm' notitle ^ invalid character Solution: If you replace the single quotes with double quotes, gnuplot is happy with the apostrophe but misinterprets the backslashes as escape character sequences. gnuplot> plot "c:\docume~1\noelo'~1\locals~1\temp\tmpcxnwsm" notitle ^ can't read data file "c:docume~1 oelo'~1locals~1 emp mpcxnwsm" ....so you need to also replace all of the backslashes with forward slashes. gnuplot> plot "c:/docume~1/noelo'~1/locals~1/temp/tmpcxnwsm" notitle **Success!!** Patch Attached: mishandledfilenames.txt |
From: Will M. <wi...@mt...> - 2005-11-07 05:11:05
|
How can I make the mouse zoom feature work through the python interface as it does when a just run gnuplot stand alone. Will |
From: Fernando P. <Fer...@co...> - 2005-10-31 05:40:46
|
Titi Anggono wrote: > Finally, I tried another way to plot the graph :) > > I found that SciPy has subpackage gplt that requires > Gnuplot. I used gplt and the plot shown. You may not want to rely on scipy.gplt. It is deprecated and has been removed from the current release. Regards, f |
From: Titi A. <tia...@ya...> - 2005-10-31 02:12:34
|
Finally, I tried another way to plot the graph :) I found that SciPy has subpackage gplt that requires Gnuplot. I used gplt and the plot shown. Titi --- Michael Haggerty <mh...@al...> wrote: > Titi Anggono wrote: > > [...] > > here I got the message > > > > ============================ > > Traceback (most recent call last): > > [...] > > File > > > "C:\Python23\Lib\site-packages\Gnuplot\gp_win32.py", > > line 125, in __call__ > > self.write(s + '\n') > > IOError: [Errno 22] Invalid argument > > ====================================== > > > > FYI, I use python2.3,Gnuplot-py-1.7 and winXP. Any > > problems with my code ?? > > I don't use windows, but I believe that this problem > usually indicates > that gnuplot (i.e., the program, not the Python > interface) didn't start > up correctly. It could be a PATH problem, for > example. If you search > the mailing list archives you will see several > similar questions and > responses. > > [Including the above paragraph :-) ] > > I just added this question to the FAQ. > > Windows users are encouraged to submit a patch to > produce a better error > message for this situation. It would help new users > a lot. (Just > remember that it has to work for all windows > versions.) > > Michael > __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com |
From: Michael H. <mh...@al...> - 2005-10-30 21:31:29
|
Titi Anggono wrote: > [...] > here I got the message > > ============================ > Traceback (most recent call last): > [...] > File > "C:\Python23\Lib\site-packages\Gnuplot\gp_win32.py", > line 125, in __call__ > self.write(s + '\n') > IOError: [Errno 22] Invalid argument > ====================================== > > FYI, I use python2.3,Gnuplot-py-1.7 and winXP. Any > problems with my code ?? I don't use windows, but I believe that this problem usually indicates that gnuplot (i.e., the program, not the Python interface) didn't start up correctly. It could be a PATH problem, for example. If you search the mailing list archives you will see several similar questions and responses. [Including the above paragraph :-) ] I just added this question to the FAQ. Windows users are encouraged to submit a patch to produce a better error message for this situation. It would help new users a lot. (Just remember that it has to work for all windows versions.) Michael |
From: Titi A. <tia...@ya...> - 2005-10-29 02:32:09
|
Hi all, I made 2 arrays, which are i and uzuy (both are float). And I want to plot the graph between those arrays. I followed from the manual ================== from Gnuplot import Gnuplot, Data g=Gnuplot() results=Data(i,uzuy) g.plot(results) ================= here I got the message ============================ Traceback (most recent call last): File "<pyshell#85>", line 1, in -toplevel- g.plot(i,uzuy) File "C:\Python23\Lib\site-packages\Gnuplot\_Gnuplot.py", line 274, in plot self.refresh() File "C:\Python23\Lib\site-packages\Gnuplot\_Gnuplot.py", line 215, in refresh self(self.plotcmd + ' ' + string.join(plotcmds, ', ')) File "C:\Python23\Lib\site-packages\Gnuplot\_Gnuplot.py", line 199, in __call__ self.gnuplot(s) File "C:\Python23\Lib\site-packages\Gnuplot\gp_win32.py", line 125, in __call__ self.write(s + '\n') IOError: [Errno 22] Invalid argument ====================================== FYI, I use python2.3,Gnuplot-py-1.7 and winXP. Any problems with my code ?? Thanks __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs |
From: Arne M. <mej...@cs...> - 2005-10-13 08:44:58
|
Great, works just fine. Thanks for your help :-D On Thu, 2005-10-13 at 11:03 +0300, Juho Schultz wrote: > On Thu, 13 Oct 2005, Arne Mejlholm wrote: > > >Hi, > > > >I'm curious as to whether there is an easier way of changning the > >default terminal type, than to edit default_term in the gp_unix.py > >file. > > > > I think something like > > Gnuplot.GnuplotOpts.default_term = "newDefaultTerminal" > g = Gnuplot.Gnuplot() > > can be used. > > |
From: Juho S. <juh...@as...> - 2005-10-13 08:03:26
|
On Thu, 13 Oct 2005, Arne Mejlholm wrote: >Hi, > >I'm curious as to whether there is an easier way of changning the >default terminal type, than to edit default_term in the gp_unix.py >file. > I think something like Gnuplot.GnuplotOpts.default_term = "newDefaultTerminal" g = Gnuplot.Gnuplot() can be used. -- Juho Schultz e-mail: juh...@as... www.astro.helsinki.fi/~jschultz Observatory P.O. Box 14 FIN-00014 University of Helsinki FINLAND |
From: Arne M. <mej...@cs...> - 2005-10-13 07:42:07
|
Hi, I'm curious as to whether there is an easier way of changning the default terminal type, than to edit default_term in the gp_unix.py file. My setup is such that I use Gnuplot-py to generate plots on the fly on my webserver, which does not have x11 installed. As far as I can tell, there is no way of setting the terminal before creating a Gnuplot instance, other than editing the source file. Am I wrong? I would consider it a nicer solution if you could specify this by something like: g = Gnuplot.Gnuplot(term="png", debug=1) This way I will not have to edit the gp_unix.py when upgrading/reinstalling Gnuplot-py. Best Regards, Arne Mejlholm |
From: Tom S. <tl...@co...> - 2005-09-20 20:53:56
|
Problem solved! The "gnuplot.py" installation had failed because I wasn't in the root directory. Installing from the root directory solved this problem!!! -------- Original Message -------- Subject: Import Error: No module named Gnuplot Date: Mon, 19 Sep 2005 12:34:07 -0500 From: Tom Strickland <tl...@co...> To: gnu...@li... As a newbie I've just installed "gnuplot.py" after installing Numeric Python on my Mandrake Linux system. However, when I try to run "python demo.py", I get an Import Error message: "No module named Gnuplot" The complete output is shown below. I don't know what the problem is or how to fix it. Thanks for your help! ******************************************************************************************************************************* [tom@localhost ~]$ dir Desktop LearnPython. rpmPkgs Welcome.desktop firefox-installer numarray-1.3.3 smoothwheel-0.44.7.20050605-fx+mz+ns+nv+tb.xpi XmaximaTut2004-1.tex gnuplot-py-1.7 Numeric-24.0b2 thunderbird XmaximaWork2004.tex install_flash_player_7_linux Python tmp [tom@localhost ~]$ cd gnuplot-py-1.7 [tom@localhost gnuplot-py-1.7]$ python demo.py Traceback (most recent call last): File "demo.py", line 22, in ? import Gnuplot, Gnuplot.funcutils ImportError: No module named Gnuplot [tom@localhost gnuplot-py-1.7]$ |
From: Tom S. <tl...@co...> - 2005-09-19 17:34:22
|
As a newbie I've just installed "gnuplot.py" after installing Numeric Python on my Mandrake Linux system. However, when I try to run "python demo.py", I get an Import Error message: "No module named Gnuplot" The complete output is shown below. I don't know what the problem is or how to fix it. Thanks for your help! ******************************************************************************************************************************* [tom@localhost ~]$ dir Desktop LearnPython. rpmPkgs Welcome.desktop firefox-installer numarray-1.3.3 smoothwheel-0.44.7.20050605-fx+mz+ns+nv+tb.xpi XmaximaTut2004-1.tex gnuplot-py-1.7 Numeric-24.0b2 thunderbird XmaximaWork2004.tex install_flash_player_7_linux Python tmp [tom@localhost ~]$ cd gnuplot-py-1.7 [tom@localhost gnuplot-py-1.7]$ python demo.py Traceback (most recent call last): File "demo.py", line 22, in ? import Gnuplot, Gnuplot.funcutils ImportError: No module named Gnuplot [tom@localhost gnuplot-py-1.7]$ |
From: Michael H. <mh...@al...> - 2005-09-07 18:52:41
|
Zoe Cournia wrote: > Thank you for the answer. Indeed it works like this now. > The structure of the files however, require that the command in gnuplot is: > > plot 'temp/spectra9.dat' u 1:2 > > otherwise the file cannot be plotted (bad data in line 0) > so is there a way to incorporate the 'u 1:2' command in the g.plot > command that you siggest? > > g.plot(Gnuplot.File('temp/spectra'+str(i)+'.dat')) g.plot(Gnuplot.File('temp/spectra'+str(i)+'.dat', using=1:2)) I recommend looking in demo.py for lots of examples like this. Michael |
From: Zoe C. <zoe...@iw...> - 2005-09-07 13:56:26
|
Dear Michael, Thank you for the answer. Indeed it works like this now. The structure of the files however, require that the command in gnuplot is: plot 'temp/spectra9.dat' u 1:2 otherwise the file cannot be plotted (bad data in line 0) so is there a way to incorporate the 'u 1:2' command in the g.plot command that you siggest? g.plot(Gnuplot.File('temp/spectra'+str(i)+'.dat')) thank you Zoe Michael Haggerty wrote: >Zoe Cournia wrote: > > >>I am trying to plot a series of files with python and gnuplot named >>sequentially as: >> >>temp/spectra1.dat >>temp/spectra2.dat >>temp/spectra3.dat ..... and so on >> >>I am generating each of these files in a loop and try to open them and >>store each file in a postscript file as: >> >> >> >>>for i in range(1,detectors): >>> data = open('temp/spectra'+str(i)+'.dat','r') >>> g.plot(data) >>> g.hardcopy('gp_test'+str(i)+'.ps', enhanced=0, color=1) >>> g.q >>> >>> > >To plot a file, you don't open the file using Python but rather pass the >plot method a Gnuplot.File object, like > > g.plot(Gnuplot.File('temp/spectra'+str(i)+'.dat')) > >With that change, I think it should work. > >(Of course, you could alternatively open the file using python, read the >data into a python array, then plot the array, but that approach doesn't >have any advantages unless you want to process the data before plotting it.) > >Michael > > >------------------------------------------------------- >SF.Net email is Sponsored by the Better Software Conference & EXPO >September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices >Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA >Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >_______________________________________________ >Gnuplot-py-users mailing list >Gnu...@li... >https://lists.sourceforge.net/lists/listinfo/gnuplot-py-users > > > -- ----------------------------------------------------------------- | Zoe Cournia, Dipl.-Chem. Phone: | | University of Heidelberg +49 6221 548808 (office) | | IWR - Computational Biophysics +49 179 4840634 (mobile) | | Im Neuenheimer Feld 368 +49 6221 346050 (home) | | D-69120 Heidelberg Fax: +49 6221 548868 | | | | email: zoe...@iw... | | http://spider.iwr.uni-heidelberg.de/~cournia/ | ----------------------------------------------------------------- |
From: Michael H. <mh...@al...> - 2005-09-06 20:17:03
|
Zoe Cournia wrote: > I am trying to plot a series of files with python and gnuplot named > sequentially as: > > temp/spectra1.dat > temp/spectra2.dat > temp/spectra3.dat ..... and so on > > I am generating each of these files in a loop and try to open them and > store each file in a postscript file as: > >> for i in range(1,detectors): >> data = open('temp/spectra'+str(i)+'.dat','r') >> g.plot(data) >> g.hardcopy('gp_test'+str(i)+'.ps', enhanced=0, color=1) >> g.q To plot a file, you don't open the file using Python but rather pass the plot method a Gnuplot.File object, like g.plot(Gnuplot.File('temp/spectra'+str(i)+'.dat')) With that change, I think it should work. (Of course, you could alternatively open the file using python, read the data into a python array, then plot the array, but that approach doesn't have any advantages unless you want to process the data before plotting it.) Michael |
From: Zoe C. <zoe...@iw...> - 2005-09-06 16:03:59
|
Dear gnuplot-py users, I am trying to plot a series of files with python and gnuplot named sequentially as: temp/spectra1.dat temp/spectra2.dat temp/spectra3.dat ..... and so on I am generating each of these files in a loop and try to open them and store each file in a postscript file as: > for i in range(1,detectors): > data = open('temp/spectra'+str(i)+'.dat','r') > g.plot(data) > g.hardcopy('gp_test'+str(i)+'.ps', enhanced=0, color=1) > g.q This doens't seem to work, what is my mistake? Thank you very much for any help, Zoe -- ----------------------------------------------------------------- | Zoe Cournia, Dipl.-Chem. Phone: | | University of Heidelberg +49 6221 548808 (office) | | IWR - Computational Biophysics +49 179 4840634 (mobile) | | Im Neuenheimer Feld 368 +49 6221 346050 (home) | | D-69120 Heidelberg Fax: +49 6221 548868 | | | | email: zoe...@iw... | | http://spider.iwr.uni-heidelberg.de/~cournia/ | ----------------------------------------------------------------- |
From: Alan G I. <ai...@am...> - 2005-08-19 22:21:26
|
Nicola Kaiser wrote: > is there any method which I haven=C2=B4t found yet in=20 > gnuplot.py to get what > would otherwise be printed on stdout? Maybe you could change class GnuplotProcess to use popen2 instead of popen? fwiw, Alan Isaac=0D |
From: Michael H. <mh...@al...> - 2005-08-19 18:15:16
|
Hello, There is no provision in Gnuplot.py for this. Regarding your attempt, I'm pretty sure that setting sys.stdout doesn't have any effect on spawned programs. And certainly not after the program is already running. Why don't you write the PNG to a temporary file then read that? Michael Nicola Kaiser wrote: > is there any method which I haven=B4t found yet in gnuplot.py to get wh= at > would otherwise be printed on stdout? >=20 > What I actually want to do is to set my terminal to png and have the > binary-png-code stored in a string instead of a file or piped to stdout. >=20 > I treid something like: >=20 > p=3DGnuplot.Gnuplot(debug=3D1) > p('set terminal png') > oldstdout=3Dsys.stdout > output=3DcStringIO.StringIO() # IO-String instanzieren > sys.stdout=3Doutput # stdout nach output umleiten > p.plot([[1,0],[2,50],[3,0],[4,20],[5,0],[6,30],[7,70], [8,70], [9, 75], > [10, 50], [11, 30], [12, 50]]) >=20 >=20 > sys.stdout=3Doldstdout > print output.getvalue() >=20 > But unfortunatelly I also get other stuff like > "gnuplot: unable to open display '' > "gnuplot: X11 aborted" >=20 > Can anyone help me on that? |
From: Nicola K. <Nic...@ur...> - 2005-08-18 22:32:32
|
Hi, is there any method which I haven=B4t found yet in gnuplot.py to get = what=20 would otherwise be printed on stdout? What I actually want to do is to set my terminal to png and have the=20 binary-png-code stored in a string instead of a file or piped to=20 stdout. I treid something like: p=3DGnuplot.Gnuplot(debug=3D1) p('set terminal png') oldstdout=3Dsys.stdout output=3DcStringIO.StringIO() # IO-String instanzieren sys.stdout=3Doutput # stdout nach output umleiten p.plot([[1,0],[2,50],[3,0],[4,20],[5,0],[6,30],[7,70], [8,70], [9, 75],=20= [10, 50], [11, 30], [12, 50]]) sys.stdout=3Doldstdout print output.getvalue() But unfortunatelly I also get other stuff like "gnuplot: unable to open display '' "gnuplot: X11 aborted" Can anyone help me on that? Thanks, Nicola |
From: BBands <bb...@ya...> - 2005-07-12 19:32:59
|
--- BBands <bb...@ya...> wrote: > Here is an unexpected result: > > >>> import Gnuplot > >>> gp = Gnuplot.Gnuplot() > >>> a = range(10) > >>> gp.plot(a, with='lines') > > Traceback (most recent call last): > File "<pyshell#3>", line 1, in -toplevel- > gp.plot(a, with='lines') > File > "d:\python24\Lib\site-packages\Gnuplot\_Gnuplot.py", > line 269, in plot > apply(self.set, (), keyw) > File > "d:\python24\Lib\site-packages\Gnuplot\_Gnuplot.py", > line 441, in set > raise 'option %s is not supported' % (k,) > option with is not supported > >>> > > What am I missing? Solved. Here is how in case anyone else stumbles. >>> import Gnuplot >>> gp = Gnuplot.Gnuplot() >>> a = range(10) >>> gp.plot(Gnuplot.Data(a, with='lines')) jab John Bollinger, CFA, CMT www.BollingerBands.com If you advance far enough, you arrive at the beginning. ____________________________________________________ Sell on Yahoo! Auctions no fees. Bid on great items. http://auctions.yahoo.com/ |
From: BBands <bb...@ya...> - 2005-07-12 18:52:27
|
Here is an unexpected result: >>> import Gnuplot >>> gp = Gnuplot.Gnuplot() >>> a = range(10) >>> gp.plot(a, with='lines') Traceback (most recent call last): File "<pyshell#3>", line 1, in -toplevel- gp.plot(a, with='lines') File "d:\python24\Lib\site-packages\Gnuplot\_Gnuplot.py", line 269, in plot apply(self.set, (), keyw) File "d:\python24\Lib\site-packages\Gnuplot\_Gnuplot.py", line 441, in set raise 'option %s is not supported' % (k,) option with is not supported >>> What am I missing? TIA, jab John Bollinger, CFA, CMT www.BollingerBands.com If you advance far enough, you arrive at the beginning. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Michael H. <mh...@al...> - 2005-07-01 19:30:26
|
Steven Waldauer wrote: > a_mag = Gnuplot.Data(w, cols=(1,6), inline=1) > mags.append(a_mag) > > s_mag = Gnuplot.Data(w, cols=(1,10), inline=1) > mags.append(s_mag) > > when I use the command: > g.plot(a_mag, s_mag) > > everything works fine. I would like however to add or remove certain > plots from within the script, but alas the command: > > g.plot(mags) > > or > g.plot(tuple(mags)) > > does not work. I get the following error messages: What you want is g.plot(*mags) or, if you are using an older version of Python, apply(g.plot, tuple(mags)) Michael |
From: Juho S. <juh...@as...> - 2005-07-01 07:55:55
|
Hi, I think g.plot() eats Gnuplot.Data objects, not lists. So you can have g.plot(data1, data2, ... dataN) but not g.plot([data1, data2, ... dataN]) Copies of all input to g.plot is added to g.itemlist... after the command above you have g.itemlist as [data1, data2, ..., dataN]. To add a line to the plot after g.plot(data) you could use newdata = Gnuplot.Data(whateveryouhave) g.replot(newdata) Now the itemlist would be [data1, data2, ..., dataN, newdata]. The way I remove stuff from the itemlist is a bit ugly. If you know the position of the unwanted item in the datalist (here assumed 1), you can do del g.itemlist[1] This does not delete you data, only the copy stored in the itemlist. After del, the itemlist would be [data1, data3, ..., dataN, newdata] Then use g.refresh() to update the plot and data2 is no longer visible. For this you need your own bookkeeping on the data in itemlist, to know the indices. If the itemlist goes empty you might get trouble. -- Juho Schultz e-mail: juh...@as... www.astro.helsinki.fi/~jschultz Observatory P.O. Box 14 FIN-00014 University of Helsinki FINLAND On Thu, 30 Jun 2005, Steven Waldauer wrote: > >I have a pretty simple script working right now, and I'm still >relatively new to python so if I'm going at this in a stupid way, >please let me know. > >right now it has the following: > > a_mag = Gnuplot.Data(w, cols=(1,6), inline=1) > a_mag.set_option(title='Amide Dipole') > a_mag.set_option(with='lines') > > mags.append(a_mag) > > s_mag = Gnuplot.Data(w, cols=(1,10), inline=1) > s_mag.set_option(title='Side Chain Dipole') > s_mag.set_option(with='lines') > > mags.append(s_mag) > >when I use the command: > g.plot(a_mag, s_mag) > >everything works fine. I would like however to add or remove certain >plots from within the script, but alas the command: > > g.plot(mags) > >or > g.plot(tuple(mags)) > >does not work. I get the following error messages: > >Traceback (most recent call last): > File "./fasttest.py", line 215, in ? > g.plot(mags) > File "/usr/local/lib/python2.4/site-packages/Gnuplot/_Gnuplot.py", >line 273, in plot > self._add_to_queue(items) > File "/usr/local/lib/python2.4/site-packages/Gnuplot/_Gnuplot.py", >line 243, in _add_to_queue > self.itemlist.append(PlotItems.Data(item)) > File "/usr/local/lib/python2.4/site-packages/Gnuplot/ >PlotItems.py", line 513, in Data > set = utils.float_array(set[0]) > File "/usr/local/lib/python2.4/site-packages/Gnuplot/utils.py", >line 36, in float_array > return Numeric.asarray(m, Numeric.Float32) > File "/usr/local/lib/python2.4/site-packages/Numeric/Numeric.py", >line 134, in asarray > return multiarray.array(a, typecode, copy=0, savespace=savespace) >AttributeError: _InlineFileItem instance has no attribute '__float__' > >Any suggestions? > >Thanks for any help, > >Steve > > >------------------------------------------------------- >SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >from IBM. Find simple to follow Roadmaps, straightforward articles, >informative Webcasts and more! Get everything you need to get up to >speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >_______________________________________________ >Gnuplot-py-users mailing list >Gnu...@li... >https://lists.sourceforge.net/lists/listinfo/gnuplot-py-users > |