help-octave
[Top][All Lists]
Advanced

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

Re: octave plotting


From: Ben Abbott
Subject: Re: octave plotting
Date: Mon, 15 Aug 2011 08:17:45 -0400

On Aug 15, 2011, at 1:00 AM, Glenn Flierl wrote:

> Hi,
> 
> Since you seem to be connected to Octave development and kindly answered by
> last question, I'd like to express a concern (which again may have already
> been resolved).  I'm running Octave as part of web services and want to create
> graphics (.png and .gif movies) that can be returned to the user.  In 3.0, I
> can run
> 
> octoff.m:
> 
> x=0:1/64:1;
> plot(x,x.*(1-x),x,x,x,1-x);
> title("plots");
> drawnow("png","/tmp/stuff.png")
> 
> with octave -q octoff.m and it creates a file that I can pass back. (I also
> modified drawnow to write to stdout, which makes this even easier.)
> 
> It fails in 3.2.4 -- I have to create the plot in an x-window and then can
> make a .png of it.
> 
> Older Octaves could use the gif terminal more readily to make movies.  It
> seems as though the expansion of graphics capabilities, valuable as it is, and
> the enhanced matlab compatibility has made using it as a web service much more
> problematic.
> 
> Perhaps some of the other graphics backends might make this easier.
> 
> I'll apologize in advance if you prefer not to receive direct emails, but
> would appreciate communicating this concern to whoever will give it some
> consideration.  And of course it may already be fixed -- if so, I'll try to
> compile Octave 3.4 to use it for future tests when I run into problems.  In
> any case, I assure you I will not overburden you with questions.
> 
> Best regards, Glenn


You desire to hide the display of figures but want to save the result correct?

The modification to you short example below should work on 3.2.4 as well as 
3.4.x.

figure (1, "visible", "off")
x=0:1/64:1;
plot(x,x.*(1-x),x,x,x,1-x);
title("plots");
print ("/tmp/stuff.png")

Ben



reply via email to

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