Hi Marize,
the best way to do this is the system command and make yourself
independent of
the gnuplot interface of octave. Thereby you can use full gnuplot
functionality without putting effort in an in-between layer interfacing
between octave and gnuplot.
***************************************************************************
A=zeros(1024,1);
for i=1:1024
A(i)=sin(2.0*pi*(i-1)/1024*10);
endfor
out=fopen("myfile", "w");
for i=1:1024
fprintf(out, "%10.3f %10.3f\n", (i-1)/1024, A(i));
endfor
fclose (out);
script=fopen("myfile.plt", "w");
fprintf(script, "set xrange[0:1]\n");
fprintf(script, "set yrange[-1:1]\n");
fprintf(script, "set terminal postscript enhanced color solid lw 2\n");
fprintf(script, "set output \"myfile.ps\"\n");
fprintf(script, "plot \"myfile\" w l\n");
fprintf(script, "set output\n");
fclose (script);
system("gnuplot myfile.plt");
****************************************************************************
and you end up with a graph in "myfile.ps" in postscript format. Expanding
this example (see i. e. /usr/share/doc/packages/gnuplot/doc/ps_guide.ps if
you are on linux) enables you to set nice fonts, you can use all commands of
gnuplot easily and if you need to repeat such graphs you could define an
octave-routine that does most things automatically.
If you convert the above genreated function into a pdf-file you can smoothly
integrate it into i. e. latex documents. Nevertheless you can use jpeg format
as easy modifying the example above accordingly.
Contact me if you need further support in this regard - best if you are using
linux, that is where I have the most experience in this regard (and several
tools making live easier).
Hope this helps,
take care
Dieter Jurzitza
--
-----------------------------------------------------------
|
\
/\_/\ |
| ~x~ |/-----\ /
\ /- \_/
^^__ _ / _ ____ /
<°°__ \- \_/ | |/ | |
|| || _| _| _| _|
if you really want to see the pictures above - use some font
with constant spacing like courier! :-)
-----------------------------------------------------------Am Samstag, 31.
Januar 2009 03:18:23 schrieb Marize Simoes:
Hi
How do I make gnuplot calls using octave?
****
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave