Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.news-service.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: sfeam Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Plotting into table with multiple columns Followup-To: comp.graphics.apps.gnuplot Date: Sat, 27 Aug 2011 22:56:40 -0700 Organization: gnuplot development team Lines: 44 Message-ID: References: <9brre9Fvf3U1@mid.individual.net> Reply-To: sfeam@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Sun, 28 Aug 2011 05:59:18 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="WEZLCPHRH3QJlZRyUKB04A"; logging-data="6404"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18M0XfvCH9AcYfKk/ADQ/fU" User-Agent: KNode/4.4.9 Cancel-Lock: sha1:KisC5ytEfY09VFBYSkQhfks00r0= Xref: x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:552 Ingo Thies wrote: > Hi all, > > maybe this has been discussed earlier, but I coulnd not find a thread > about this. > > I want to redirect a plot into a table but such that all data are > plotted as separate columns. I.e. consider, let's say, a number of > functions f1 to fn, and the table should look like this > > col1 col2 col3 ... coln+1 > x f1(x) f2(x) ... fn(x) > > (replace in mind these labels with the corresponding values) > > Currently, gnuplot writes them in blocks one after the other. I know > that one can plot up to three columns using parametric mode and splot > to table (this has been discussed here already, AFAIR), but > unfortunately, I need four columns... > > Is it possible to use a print statement inside a for-loop? This would > solve the problem. Not in version 4.4. Yes in version 4.5: increment = whatever x = start do for [i=1:N] { print f1(x), f2(x), f3(x), f4(x), ... x = x + increment } > I could, of course, do this in an external program, > but it would be nice and elegant to do this in the same gp script > without invoking external self-written software. > > Thanks in advance! > > Ingo