[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnuplot scripts as output?
From: |
Dr. Ing. Dieter Jurzitza |
Subject: |
Re: Gnuplot scripts as output? |
Date: |
Fri, 2 Apr 2010 18:50:17 +0200 |
User-agent: |
KMail/1.11.4 (Linux/2.6.22.19-0.4a-default; KDE/4.2.4; i686; ; ) |
Dear Tribo,
basically nobody stops you from exporting the data into ascii files:
octave:1> for i=1:1000
> A(i)=sin(2.0*pi*(i-1)/999.0);
> endfor
octave:2> outfile = fopen("dummy.dat", "w");
octave:3> for i=1:1000
> fprintf(outfile, "%d %f\n", i, A(i));
> endfor
octave:4> fclose (outfile)
ans = 0
would write a sinusoid into a file. Given you start gnuplot in the directory
you wrote "dummy.dat"
to, you could say:
plot "dummy.dat" using 1:2 w l lw 2 title "A sine"
well, and the title says what you'll get. And by this you could circumvent the
problems with binary
data for plotting in gnuplot, simply export them into ascii-files, adopt the
names in the gnuplot-
plt file accordingly and you ought to be done.
Hope this helps,
take care
Dieter
--
-----------------------------------------------------------
|
\
/\_/\ |
| ~x~ |/-----\ /
\ /- \_/
^^__ _ / _ ____ /
<°°__ \- \_/ | |/ | |
|| || _| _| _| _|
if you really want to see the pictures above - use some font
with constant spacing like courier! :-)
-----------------------------------------------------------