[Top][All Lists]

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


> 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

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.

Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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