help-octave
[Top][All Lists]
Advanced

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

Re: how to create a png from bash or php-file


From: Muthu
Subject: Re: how to create a png from bash or php-file
Date: Mon, 6 Dec 2004 04:13:49 -0800 (PST)

Hi!

> 1.) how can i run my "grph.m" out from a linux-bash?
> maybe "octave grph.m"?
> but i only got the greeting-text and no plot?

Try using a 
#! /usr/bin/octave -q 
as the first line of your script grph.m & make it
chmod +x, and run it.

 
> 2:) how can i run my program out from a php-script
> (maybe with "shell_exec") or from a bash-script, so
> that i get a file grph.png?
> what commands shall i add in my grph.m-file and what
> commands do i need to
> add in my php-script/bash-script?

For Bash scripts,
you can set GNU Plot's preferences to plot to the
GUI terminal or to a eps/png/jpeg file. See `info
octave/plotting`.

As for php scripts,
try an execve() on octave! 

Rather, run your script 'grph.m' from the terminal
and as said above set the term of gnuplot to a png
file. Later from PHP you can access this file.

IMHO this must work.
Cheers
Muthu


                
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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