octave-maintainers
[Top][All Lists]
Advanced

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

Re: Request to run a command in matlab.


From: David Bateman
Subject: Re: Request to run a command in matlab.
Date: Thu, 17 Jun 2010 08:18:20 +0200
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

Ben Abbott wrote:
On Jun 16, 2010, at 7:20 PM, David Bateman wrote:

Could someone with access to matlab tell me if with the command

plot(1:10); whitebg(); drawnow(); sleep(2); reset(0)

the call to reset changes the color of the figure back to the default colors? 
The documentation from matlab is unclear on this point, of whether reset 
changes the default properties and only affects subsequent figures or if the 
changes take effect immediately. Also what does

plot(1:10); whitebg(); drawnow(); sleep(2); reset(gca())

do, as this might very well be a different case? I've now implemented the 
whitebg command and would like to implement colordef and reset before posting 
this code, and need the feedback of how matlab treats the above two commands to 
be able to implement the reset function.

Cheers
David

With a fresh matlab the command below produces a dark gray figure background 
and a black axes background.

        plot(1:10); whitebg();

With a fresh matlab the command below produces the same.

        plot(1:10); whitebg(); drawnow(); pause(2); reset(0)

If I run whitebg() again, it toggles to a light gray figure background and a 
white axis background (which is the default).

With a fresh matlab the command below produces  the same result.

        plot(1:10); whitebg(); drawnow(); pause(2); reset(gca())

For me, neither reset(0) or reset(gca()) produce visible changes.

Ben



Ok, so reset only changes the defaults and not the values of the existing plots like whitebg does

D.



reply via email to

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