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...> - 2012-01-01 14:01:22
|
On 12/19/2011 12:29 PM, e....@nk... wrote: > I have a strange behaviuor when I try to plot. Unfortunately I > couldn't yet discover something reproducible in the error. > > Here it is the gnuplot output > > put data ('e' ends) > 3095.52929688 5558.18603516 input data ('e' > ends) > 3109.60009766 5553.88037109 input data ('e' ends) > > 3123.6706543 5549.58398438171 554186 178182 660198 24 input data ('e' > ends) > 4352383.282863.721483.361153.9 189236 792242 271257 8201 > 79552555.243225.264085.196755.427425.189185.160855.6819.13 127423 > 664428 221434 825440 458455 016551 687567 2935725.534805.845565.5 > input data ('e' ends) > 393446 input data ('e' ends) > 85.9 input > data ('e' ends) > > > what does it mean? It seems that the numbers got mixed up, isn't it? > > I'm plotting two numpy.arrays as > > Gnuplot.Data(X,Y, with_="lines", title="some title") I think you need to provide more specific information about how you generated this output, what you saw on your screen, what you expected, what platform you are using, whether you have changed any of the default Gnuplot.py settings, etc. Best would be that you include a simple script that fails as you described so that we can reproduce the problem. The output that you listed above doesn't necessarily indicate a problem; it looks like Gnuplot.py is using gnuplot's "plot '-'" feature to pass the data to gnuplot inline. The fact that the prompts don't match up with the number pairs is, I believe, inconsequential. Michael -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: <e....@nk...> - 2011-12-19 11:42:43
|
Dear all, I have a strange behaviuor when I try to plot. Unfortunately I couldn't yet discover something reproducible in the error. Here it is the gnuplot output put data ('e' ends) > 3095.52929688 5558.18603516 input data ('e' ends) > 3109.60009766 5553.88037109 input data ('e' ends) > 3123.6706543 5549.58398438171 554186 178182 660198 24 input data ('e' ends) > 4352383.282863.721483.361153.9 189236 792242 271257 8201 79552555.243225.264085.196755.427425.189185.160855.6819.13 127423 664428 221434 825440 458455 016551 687567 2935725.534805.845565.5 input data ('e' ends) > 393446 input data ('e' ends) > 85.9 input data ('e' ends) > what does it mean? It seems that the numbers got mixed up, isn't it? I'm plotting two numpy.arrays as Gnuplot.Data(X,Y, with_="lines", title="some title") Now at some point I could fix this problem by plotting "lines" instead of "linespoints". But indeed the problem is not that. Thanks Edo Edoardo Pasca, Ph.D The Netherlands Cancer Institute -- Antoni van Leeuwenhoek Hospital Radiotherapy Department Plesmanlaan 121 1066 CX Amsterdam tel: 0031 (0)20 512 1759 |
From: Krzysztof B. <krz...@gm...> - 2011-11-22 21:05:27
|
Hi, Thanks for your answers. I don't have more time to play with gnuplot so I decided to use only python's tools Finally I use scipy to fittnig my data. This is my code def main(): z,f = numbers_col() fitfunc = lambda v, z: v[0]*exp(z*v[1]) errfunc = lambda v, z,f: fitfunc(v,z) - f v0 = [10., 0.005] v1,success = optimize.leastsq(errfunc, v0[:], args = (z,f),full_output=True) best regars, Cris 2011/11/14 Michael Haggerty <mh...@al...> > On 11/12/2011 05:43 PM, Krzysztof Berniak wrote: > > I'm writing script in python, which fitting exponencial curve to data ( > > f(x) = a*exp(x*b). > > To this problem, I use gnuplot in my script. Gnuplot display parameters > > ( a +/- delta a; b +/- delta b) > > How Can I use/save this parameters in python variables in next steps of > > my script, > > > > def main(): > > ... > > > > > > plot = Gnuplot.Gnuplot() > > > > plot('f1(x) = a1*exp(b1*x)') > > plot('a1 = 300; b1 = 0.005;') > > plot('fit f1(x) "data.txt" using 1:2 via a1, b1') > > > > print "first parameter", a1 > > print "second parameter", b1 # is it feasible ? Or there is > > another way to see the results ( parameter a1 and b1) of gnuplot by > python > > > > #plot('set terminal postscript') > > #plot('set output "output.ps <http://output.ps>"') > > The communication from Gnuplot.py to gnuplot is currently > one-directional only. Therefore, there is no way for Gnuplot.py to see > the output that gnuplot writes to the terminal. > > So without rewriting Gnuplot.py to change that fact (which would be a > big job), the easiest thing would be to have gnuplot write the results > of the fit to a file (see "help update"), then have Python read that > file. If you want more information about the fit, you can read the > logfile that gnuplot's "fit" command generates (see "help fit", "help > set fit"). > > Michael > > -- > Michael Haggerty > mh...@al... > http://softwareswirl.blogspot.com/ > |
From: Lorenzo M. <lor...@ya...> - 2011-11-19 14:10:33
|
Hallo Michael, even if it is not frequently maintained, I find gnuploy.py still very useful, and, I think, it's clear and well written. So, thank you for this project! About set_tics method, I think your way is far more general than mine, and agree with your approach. lorenzo --- Sab 19/11/11, Michael Haggerty <mh...@al...> ha scritto: > Da: Michael Haggerty <mh...@al...> > Oggetto: Re: [Gnuplot-py-users] tics labels > A: "Lorenzo Mentaschi" <lor...@ya...> > Cc: gnu...@li... > Data: Sabato 19 novembre 2011, 14:36 > On 10/09/2011 12:03 PM, Lorenzo > Mentaschi wrote: > > in order to make gnuplot-py deal with xtics labels of > string type > > (without building the gnuplot command in user code), I > added this method > > to Gnuplot class: > > > > > > ###### > > def set_tics_labels(self, > labels, axis = 'x'): > > cmd = 'set > %stics (' % (axis,) > > for indx, label > in zip(range(len(labels)), labels): > > cmd += > '"%s" %i,' % (label, indx,) > > cmd = > cmd.strip(',') + ")" > > self(cmd) > > > ###### > > > > > > This seems to work for me. Is there any smarter way to > do this? > > Thanks for your submission. > > If I understand correctly, your function takes a list of > label strings > as argument and places the 0th label in the list at axis > position 0.0, > the 1st label at axis position 1.0, etc. Is that > correct? > > Because this seems quite special-purpose. The gnuplot > "set *tics" > commands are much more flexible. They allow labels to > be placed at > arbitrary positions and allow the user to specify which tic > marks are > major vs. minor. If we are going to build a > set_tics_labels() command > into Gnuplot, then I think it should provide access to more > of gnuplot's > functionality. > > What do you think of the attached patch? > > Michael > > -- > Michael Haggerty > mh...@al... > http://softwareswirl.blogspot.com/ > |
From: Michael H. <mh...@al...> - 2011-11-19 14:00:28
|
On 11/19/2011 02:55 PM, Michael Haggerty wrote: > On 11/18/2009 11:15 AM, zhangwei02 wrote: Oops, that's embarrassing. Somehow I had my email sorted strangely and I thought that this was a brand new message that I was responding to. I didn't notice that it was 1 day *plus 2 years* old. My response is probably too late to be helpful :-( Michael -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: Michael H. <mh...@al...> - 2011-11-19 13:56:28
|
On 11/18/2009 11:15 AM, zhangwei02 wrote: > [...] > gnuplot: unable to open display '' > gnuplot: X11 aborted. > line 0: Bad format character Why do you think that your problem is related to setting a date format? Can you get your script to plot *anything*? It looks to me like gnuplot is trying to plot something to an X11 window (even though your goal seems to be only to output a PNG file). But it fails, perhaps because your DISPLAY variable is not set or because you are running this script in a non-X11 environment. I'm not sure why gnuplot is trying to output to an X11 window. You don't seem to generate any output before resetting the terminal type to png. Try loading the same commands (the ones output by Gnuplot.py's debug=1 mode) directly into gnuplot in the same environment where the script is run, to see whether it gives the same error. If so, try running the same commands but without the "set terminal x11" line and see if the error goes away. If it goes away, then you might be able to work around the problem by setting your "default_term" to something other than x11 using something like import Gnuplot Gnuplot.gp.GnuplotOpts.default_term = 'dumb' before you create the Gnuplot object. Please let us know what you find out. Michael -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: Michael H. <mh...@al...> - 2011-11-19 13:36:50
|
On 10/09/2011 12:03 PM, Lorenzo Mentaschi wrote: > in order to make gnuplot-py deal with xtics labels of string type > (without building the gnuplot command in user code), I added this method > to Gnuplot class: > > > ###### > def set_tics_labels(self, labels, axis = 'x'): > cmd = 'set %stics (' % (axis,) > for indx, label in zip(range(len(labels)), labels): > cmd += '"%s" %i,' % (label, indx,) > cmd = cmd.strip(',') + ")" > self(cmd) > ###### > > > This seems to work for me. Is there any smarter way to do this? Thanks for your submission. If I understand correctly, your function takes a list of label strings as argument and places the 0th label in the list at axis position 0.0, the 1st label at axis position 1.0, etc. Is that correct? Because this seems quite special-purpose. The gnuplot "set *tics" commands are much more flexible. They allow labels to be placed at arbitrary positions and allow the user to specify which tic marks are major vs. minor. If we are going to build a set_tics_labels() command into Gnuplot, then I think it should provide access to more of gnuplot's functionality. What do you think of the attached patch? Michael -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: Michael H. <mh...@al...> - 2011-11-19 12:41:40
|
On 10/09/2011 03:31 PM, Lorenzo Mentaschi wrote: > Hi all, I modified PlotItem class adding the option "fs", meaning > "fill style", an option useful when plotting bar diagrams or > histograms (added in gnuplot 4). Theoretically it should be possible > to set this option also by "with boxes fs <pattern>", but this seem > to lose box width settings ...) > > I'm sending you the modified PlotItem.py module, and a sample script > to make clear when this might come useful (in the example the method > I described in my previous mail is also used). > > Do you think what I did is right? Or is there a better approach? Sorry for the delay in responding. (Gnuplot.py is not really being maintained anymore.) Your suggestion looks fine. I just committed it to Gnuplot.py as r317. Thanks! Michael -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: Michael H. <mh...@al...> - 2011-11-19 06:40:52
|
On 10/07/2011 02:45 PM, Charles Gagnon wrote: > I had a gnoplot script I am trying to convert into python using > gnuplot-py. I have a list of historical prices like this: > > 2010-11-24,19.33,19.55,19.32,19.46,63880400,19.2 > > My basic gnuplot call were: > > set grid nopolar > set grid xtics nomxtics ytics nomytics noztics nomztics nox2tics > nomx2tics noy2tics nomy2tics nocbtics nomcbtics > set grid layerdefault linetype 0 linewidth 1.000, linetype 0 linewidth 1.000 > > # Chart Title > set title "CSCO 1yr" > > set xdata time > set timefmt "%Y-%m-%d" > set format x "%m/%y" > > set lmargin 9 > set rmargin 2 > set datafile separator "," > > plot 'data/CSCO_365.csv' using 1:2:3:4:5 notitle with financebars lt 8 > > Instead of doing it through a csv, I was trying to plot from the list > directly. So I took out the datafile seperator but I am having a hard > time porting that to python. Most of my options were just set with a > > g('set lmargin 9') > > line. But I'm not sure how to handle my plot statement. I can pass my > list to g.plot() but it lacks all the other definitions. What am I > missing? Gnuplot.py only has support for plotting numbers, not dates. You would probably have to either derive your own PlotItem class or teach the existing PlotItem classes how to work with dates. One alternative that might work: if gnuplot can parse some numerical format as dates (e.g., unix timestamp long values), then maybe you could convert the dates to numbers then pass them to gnuplot as numbers. However, you might lose too much precision, as Gnuplot.py would probably want to convert the numbers to doubles or floats. Michael -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: Lorenzo M. <lor...@ya...> - 2011-11-14 13:12:59
|
Hi, I'm not an expert of scipy, but you might perform the fit using scipy, and then pass all to gnuplot. http://www.scipy.org/Cookbook/FittingData lorenzo --- Sab 12/11/11, Krzysztof Berniak <krz...@gm...> ha scritto: Da: Krzysztof Berniak <krz...@gm...> Oggetto: [Gnuplot-py-users] export output from gnuplot to python A: gnu...@li... Data: Sabato 12 novembre 2011, 17:43 Hi all, I'm writing script in python, which fitting exponencial curve to data ( f(x) = a*exp(x*b).To this problem, I use gnuplot in my script. Gnuplot display parameters ( a +/- delta a; b +/- delta b) How Can I use/save this parameters in python variables in next steps of my script, def main(): ... plot = Gnuplot.Gnuplot() plot('f1(x) = a1*exp(b1*x)') plot('a1 = 300; b1 = 0.005;') plot('fit f1(x) "data.txt" using 1:2 via a1, b1') print "first parameter", a1 print "second parameter", b1 # is it feasible ? Or there is another way to see the results ( parameter a1 and b1) of gnuplot by python #plot('set terminal postscript') #plot('set output "output.ps"') regards and please help, Cristopher -----Segue allegato----- ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 -----Segue allegato----- _______________________________________________ Gnuplot-py-users mailing list Gnu...@li... https://lists.sourceforge.net/lists/listinfo/gnuplot-py-users |
From: Michael H. <mh...@al...> - 2011-11-14 09:16:42
|
On 11/12/2011 05:43 PM, Krzysztof Berniak wrote: > I'm writing script in python, which fitting exponencial curve to data ( > f(x) = a*exp(x*b). > To this problem, I use gnuplot in my script. Gnuplot display parameters > ( a +/- delta a; b +/- delta b) > How Can I use/save this parameters in python variables in next steps of > my script, > > def main(): > ... > > > plot = Gnuplot.Gnuplot() > > plot('f1(x) = a1*exp(b1*x)') > plot('a1 = 300; b1 = 0.005;') > plot('fit f1(x) "data.txt" using 1:2 via a1, b1') > > print "first parameter", a1 > print "second parameter", b1 # is it feasible ? Or there is > another way to see the results ( parameter a1 and b1) of gnuplot by python > > #plot('set terminal postscript') > #plot('set output "output.ps <http://output.ps>"') The communication from Gnuplot.py to gnuplot is currently one-directional only. Therefore, there is no way for Gnuplot.py to see the output that gnuplot writes to the terminal. So without rewriting Gnuplot.py to change that fact (which would be a big job), the easiest thing would be to have gnuplot write the results of the fit to a file (see "help update"), then have Python read that file. If you want more information about the fit, you can read the logfile that gnuplot's "fit" command generates (see "help fit", "help set fit"). Michael -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: Krzysztof B. <krz...@gm...> - 2011-11-12 16:43:18
|
Hi all, I'm writing script in python, which fitting exponencial curve to data ( f(x) = a*exp(x*b). To this problem, I use gnuplot in my script. Gnuplot display parameters ( a +/- delta a; b +/- delta b) How Can I use/save this parameters in python variables in next steps of my script, def main(): ... plot = Gnuplot.Gnuplot() plot('f1(x) = a1*exp(b1*x)') plot('a1 = 300; b1 = 0.005;') plot('fit f1(x) "data.txt" using 1:2 via a1, b1') print "first parameter", a1 print "second parameter", b1 # is it feasible ? Or there is another way to see the results ( parameter a1 and b1) of gnuplot by python #plot('set terminal postscript') #plot('set output "output.ps"') regards and please help, Cristopher |
From: Lorenzo M. <lor...@ya...> - 2011-10-09 13:31:56
|
Hi all, I modified PlotItem class adding the option "fs", meaning "fill style", an option useful when plotting bar diagrams or histograms (added in gnuplot 4). Theoretically it should be possible to set this option also by "with boxes fs <pattern>", but this seem to lose box width settings ...) I'm sending you the modified PlotItem.py module, and a sample script to make clear when this might come useful (in the example the method I described in my previous mail is also used). Do you think what I did is right? Or is there a better approach? Thank you, lorenzo |
From: Lorenzo M. <lor...@ya...> - 2011-10-09 10:03:42
|
Hi all, in order to make gnuplot-py deal with xtics labels of string type (without building the gnuplot command in user code), I added this method to Gnuplot class: ###### def set_tics_labels(self, labels, axis = 'x'): cmd = 'set %stics (' % (axis,) for indx, label in zip(range(len(labels)), labels): cmd += '"%s" %i,' % (label, indx,) cmd = cmd.strip(',') + ")" self(cmd) ###### This seems to work for me. Is there any smarter way to do this? best regards, lorenzo |
From: Charles G. <cha...@un...> - 2011-10-07 14:39:44
|
I had a gnoplot script I am trying to convert into python using gnuplot-py. I have a list of historical prices like this: 2010-11-24,19.33,19.55,19.32,19.46,63880400,19.2 My basic gnuplot call were: set grid nopolar set grid xtics nomxtics ytics nomytics noztics nomztics nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics set grid layerdefault linetype 0 linewidth 1.000, linetype 0 linewidth 1.000 # Chart Title set title "CSCO 1yr" set xdata time set timefmt "%Y-%m-%d" set format x "%m/%y" set lmargin 9 set rmargin 2 set datafile separator "," plot 'data/CSCO_365.csv' using 1:2:3:4:5 notitle with financebars lt 8 Instead of doing it through a csv, I was trying to plot from the list directly. So I took out the datafile seperator but I am having a hard time porting that to python. Most of my options were just set with a g('set lmargin 9') line. But I'm not sure how to handle my plot statement. I can pass my list to g.plot() but it lacks all the other definitions. What am I missing? -- Charles Gagnon charlesg at unixrealm.com |
From: Michael H. <mh...@al...> - 2011-09-30 07:16:09
|
On 09/29/2011 09:18 PM, Greg van Anders wrote: > I've just started using gnuplot-py and have been finding it very useful. > > Version 1.8 doesn't seem to have the epslatex terminal option, which > is the one I use most often in ordinary gnuplot. I added an epslatex > terminal option and I was wondering how to contribute it as I thought > others might find it useful. Best would be to submit a patch to the mailing list. Let me know if you need more information about how to create a patch. Michael -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: Greg v. A. <gre...@gm...> - 2011-09-29 19:18:45
|
Hello, I've just started using gnuplot-py and have been finding it very useful. Version 1.8 doesn't seem to have the epslatex terminal option, which is the one I use most often in ordinary gnuplot. I added an epslatex terminal option and I was wondering how to contribute it as I thought others might find it useful. Thanks! Greg |
From: Ken S. <k.w...@qu...> - 2011-08-23 11:30:23
|
Many thanks Michael Indeed I just needed to close my Gnuplot() objects. Not a single error (in ~10,000 plots) after I did that. Cheers, Ken On 22 Aug 2011, at 09:22, Michael Haggerty wrote: > On 08/18/2011 05:31 PM, Ken Smith wrote: >> Apologies in advance if there's an FAQ, but I can't find it... (Feel >> free to point it out to me...) > > There is a FAQ.txt in the Gnuplot.py distribution. The first FAQ > question is closely related to your problem. > >> The problem is that (presumably because of threading) Gnuplot.py is >> sometimes not completing its work before I attempt to convert the >> plot. Hence ImageMagic complains about missing postscript files - or >> the postscript files are incomplete when conversion starts. >> >> Is there a way to turn threading/FIFOs OFF? Or is there a way I can >> use "join" to force my python program to WAIT for the plot to be >> completed before attempting to convert it? > > The problem is not so much the multithreading in Gnuplot.py (which > anyway should be turned off if your turn off the use of FIFOs) but > rather the fact that a separate process (the gnuplot program) is doing > the real work. I believe that if you close() the Gnuplot object > explicitly then it will wait for gnuplot to finish (though of course > you > will have to create a new Gnuplot object if you want to do more work > afterwards): > > g = Gnuplot.Gnuplot() > # Use g to plot what you want > g.close() > # At this point I think that all of the gnuplot output should be > # done. > > Please try this out and tell us if it works. > > Michael > > -- > Michael Haggerty > mh...@al... > http://softwareswirl.blogspot.com/ |
From: Michael H. <mh...@al...> - 2011-08-23 07:56:13
|
On 08/23/2011 04:33 AM, Sears Merritt wrote: > I am trying plot many datasets (1500) in a single plot and am running > into an I/O error due to too many open files. > > The code is as follows: > > for row in dataSet: > plots.append(Gnuplot.PlotItems.Data(eval(row[2]))) > g.plot(*plots) > g.hardcopy(filename='output.ps') > > Has anyone found a workaround for this issue? You might want to put multiple datasets in a single file (e.g., separated by blank lines). This means that they will all be plotted in the same style, but with 1500 datasets I doubt that the datasets are very distinct anyway. If you insist on having so many distinct datasets, they you have to increase the number of file descriptors allowed to your process. See, for example, [1] or [2]. Michael [1] http://stackoverflow.com/questions/880557/linux-socket-accept-too-many-open-files [2] http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/ -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: Sears M. <sea...@gm...> - 2011-08-23 02:33:22
|
I am trying plot many datasets (1500) in a single plot and am running into an I/O error due to too many open files. The code is as follows: for row in dataSet: plots.append(Gnuplot.PlotItems.Data(eval(row[2]))) g.plot(*plots) g.hardcopy(filename='output.ps') Has anyone found a workaround for this issue? Thanks in advance |
From: Michael H. <mh...@al...> - 2011-08-22 08:46:19
|
On 08/18/2011 05:31 PM, Ken Smith wrote: > Apologies in advance if there's an FAQ, but I can't find it... (Feel > free to point it out to me...) There is a FAQ.txt in the Gnuplot.py distribution. The first FAQ question is closely related to your problem. > The problem is that (presumably because of threading) Gnuplot.py is > sometimes not completing its work before I attempt to convert the > plot. Hence ImageMagic complains about missing postscript files - or > the postscript files are incomplete when conversion starts. > > Is there a way to turn threading/FIFOs OFF? Or is there a way I can > use "join" to force my python program to WAIT for the plot to be > completed before attempting to convert it? The problem is not so much the multithreading in Gnuplot.py (which anyway should be turned off if your turn off the use of FIFOs) but rather the fact that a separate process (the gnuplot program) is doing the real work. I believe that if you close() the Gnuplot object explicitly then it will wait for gnuplot to finish (though of course you will have to create a new Gnuplot object if you want to do more work afterwards): g = Gnuplot.Gnuplot() # Use g to plot what you want g.close() # At this point I think that all of the gnuplot output should be # done. Please try this out and tell us if it works. Michael -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: Ken S. <k.w...@qu...> - 2011-08-18 15:31:15
|
Folks Apologies in advance if there's an FAQ, but I can't find it... (Feel free to point it out to me...) There also doesn't seem to be a simple way to search the Sourceforge archives for this group... I've been using Gnuplot.py for a while now, and I keep running into the same problem. I'm creating postscript plots, but at the end of my script I'd like to convert them into JPEGs using ImageMagick (convert). The problem is that (presumably because of threading) Gnuplot.py is sometimes not completing its work before I attempt to convert the plot. Hence ImageMagic complains about missing postscript files - or the postscript files are incomplete when conversion starts. Is there a way to turn threading/FIFOs OFF? Or is there a way I can use "join" to force my python program to WAIT for the plot to be completed before attempting to convert it? I've tried setting the following after my Gnuplot import: Gnuplot.GnuplotOpts.prefer_fifo_data = 0 Gnuplot.GnuplotOpts.support_fifo = 0 Gnuplot.GnuplotOpts.prefer_inline_data = 1 but to no avail. The only thing I'm doing at the moment is checking that the postscript file exists - but this is just a fudge and doesn't prevent other issues if the file is incomplete. Below are example errors... Ken Example errors: MISSING ps file convert: unable to open image `/tmp/tempPSPlots/ 1095652401023547700_lc.ps': @ error/blob.c/OpenBlob/2584. convert: missing an image filename `/psdb/images/ps1ss/lightcurves/1095652401023547700_lc.jpeg' @ error/convert.c/ConvertImageCommand/2949. INCOMPLETE ps file (presumably that's what causes ghostscript to barf) Error: /syntaxerror in -file- Operand stack: MLshow Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- %--nostringval-- 2 %stopped_push --nostringval-- -- nostringval-- %--nostringval-- false 1 %stopped_push 1894 1 3 %oparray_pop %1893 1 3 %oparray_pop 1877 1 3 %oparray_pop 1771 1 3 %%oparray_pop --nostringval-- %errorexec_pop .runexec2 %--nostringval-- --nostringval-- --nostringval-- 2 %stopped_push Dictionary stack: --dict:1158/1684(ro)(G)-- --dict:0/20(G)-- --dict:80/200(L)-- --dict:176/256(L)-- Current allocation mode is local Last OS error: 2 GPL Ghostscript 9.00: Unrecoverable error, exit code 1 |
From: Michael H. <mh...@al...> - 2011-07-17 05:25:40
|
On 07/17/2011 05:03 AM, tony wrote: > I'm using gnuplot-py to monitor data from a serial port, and it works > fine while the main python program is running. But I would like to keep > the plot open after python closes - is that possible? I can obviously > reopen the data file and reconstruct the plot, but it would be useful to > keep the original plot window open. g = Gnuplot.Gnuplot(persist=True) , if your platform supports it. Michael -- Michael Haggerty mh...@al... http://softwareswirl.blogspot.com/ |
From: tony <t.v...@in...> - 2011-07-17 03:03:35
|
Michael I'm using gnuplot-py to monitor data from a serial port, and it works fine while the main python program is running. But I would like to keep the plot open after python closes - is that possible? I can obviously reopen the data file and reconstruct the plot, but it would be useful to keep the original plot window open. Thanks Tony |
From: alain d. <ala...@gm...> - 2011-07-07 07:41:21
|
Hi, Using gnuplot.py in an interactive manner, I would like to generate in the mean time a png or jpeg output. Is there a way to do that while keeping the interactive window? Regards Alain -- |