help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plot directly to postscript with Octave2.9 on low end server


From: Dieter Jurzitza
Subject: Re: plot directly to postscript with Octave2.9 on low end server
Date: Thu, 5 Jun 2008 23:16:10 +0200
User-agent: KMail/1.9.6 (enterprise 20070904.708012)

Dear Jacco,
there is only one way IMHO:

write the data you want to plot into a file (for example) "dummy.dat" 
containing (for example) x - y values, e.g.

0 0
1 1
2 4
3 9

for y=x**2. The file can be handled very much like in "C", fopen will open it, 
fprintf can write to it etc .... 
Then write a plt-file dummy.plt with the following contents (or similar):

#!/usr/bin/gnuplot
set terminal postscript enhanced color solid linewidth 2 "Arial, 12"
set output "dummy.ps"
plot "dummy.dat" using 1:2 w l
set output
set terminal

make it executable system("chmod 0755 dummy.plt") and execute "dummy.plt" with 
a system command from within octave (system(dummy.plt)). This should result 
in a postscript file "dummy.ps" in your working directory.
Hope this helps,
take care



Dieter

-- 
-----------------------------------------------------------

                               |
                                \
                 /\_/\           |
                | ~x~ |/-----\   /
                 \   /-       \_/
  ^^__   _        /  _  ____   /
 <°°__ \- \_/     |  |/    |  |
  ||  ||         _| _|    _| _|

if you really want to see the pictures above - use some font
with constant spacing like courier! :-)
-----------------------------------------------------------Am Dienstag, 3. 
Juni 2008 16:32:47 schrieb jacco77:
> Hi,
>
> I am trying to produce a postscript plot using octave on my Ubuntu 7.10
******



reply via email to

[Prev in Thread] Current Thread [Next in Thread]