[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnuplot commands
From: |
mavram |
Subject: |
Re: gnuplot commands |
Date: |
Mon, 7 Feb 2005 13:16:16 +0200 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On Sun, Feb 06, 2005 at 10:06:03PM -0700, Dmitri A. Sergatskov wrote:
> address@hidden wrote:
> ...
>
> >of the mails how to print out the commands octave sends to
> >gnuplot (actually two mails: the answers sent by J.W.Eaton and by
> >P.Kienzle to T.Kornack).
> >So I wrote: gnuplot_binary = "tee /tmp/a | gnuplot" at the octave
> >prompt and plotted a graph.
> >Apparenly this is not working anymore (octave 2.1-57, gnuplot
> >4.0), as, at the end of the day, there was no /tmp/a file.
>
> I reported this problem (about "tee") approximately when 2.1.53
> came out, but no-one was interested...
> Anyway, the workaround is to make a shell "mygnuplot"
>
> #!/bin/sh
> tee /tmp/a | gnuplot
>
> and then define gnuplot_binary="mygnuplot"
>
> May be I do not understand what do you want to plot, but I think
> the plot command you want to use in gnuplot is probably
>
> plot "u" using 1:2 with points pointsize 0.4,\
> "u" using 1:3 with points pointsize 0.4,\
> "u" using 1:4 with points pointsize 0.8
>
> Assuming the data file consist of three columns:
> first is your X coordinates, first data set is the second column,
> second dataset is the third, and average is the 4th column.
> If your X is just an index (1,2,3,4,...) then you can skip first
> column and do
> plot "u" using 1 ...
> "u" using 2 ...
> "u" using 3 ...
>
> See help on "plot using" in gnuplot.
> (This is all off the top of my head, completely untested).
....
> Dmitri.
--
Hi Dmitri,
Thanks a lot for the two prompt and informative answers.
Regading gnuplot: The main difference between the command I
tried and yours is that I counted the colums of data from 0 -as
they explicitely say in the manual, while you obviously knew
better. Gnuplot just ignored the "index 0:n" subcommand without any
protest or warning. It would be hard to find out what was wrong
without this wonderful mailing list. Thanks again.
About the workaround you suggest: Could you please be more
explicit ? Should one give these commands (looks like shell
script) before starting octave ? Or somehow (how ?) from within
octave ? My guess: 'write a script containing the two lines and
named gnuplot_binary, change its mode to +x and store it
somewhere in the path. Then start octave, issue the command
gnuplot_binary="mygnuplot" (or with full path), make some graph
and look up /tmp/a', did not work.
Sorry to bother with questions, the answers to which are obvious
to those who understand the internals and the organisation of
the software. But having a means to see the commands that octave
sends to gnuplot and using them as examples might actually save
on the number of stupid questions I find necessary to ask...
Cheers, Avraham
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------