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: Ben Abbott
Subject: Re: Request to run a command in matlab.
Date: Wed, 16 Jun 2010 20:18:16 -0400

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




reply via email to

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