help-octave
[Top][All Lists]
Advanced

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

RE: removing text from graph


From: financial engineer
Subject: RE: removing text from graph
Date: Tue, 27 Mar 2012 21:35:09 -0400




Date: Tue, 27 Mar 2012 01:06:03 -0400
Subject: Re: FW: removing text from graph
From: address@hidden
To: address@hidden
CC: address@hidden

On Tue, Mar 27, 2012 at 12:36 AM, financial engineer <address@hidden> wrote:


how does one remove the text from a 2d plot.
I executed the following command and it worked, but now I want to remove the text without having to redo the graph all over again.

text(30,8545,"S","Color","g","FontWeight","bold","fontsize",15);

I tried text("remove") but it did not work....


The easiest way that I've found is to save the handle that is returned then call delete on the handle when you want to delete it like this:

h = text(0,0,"stuff");

<other interesting code>

delete(h);

If you have multiple texts that you want to print then delete, then you can simply have a vector that you can populate with the "h"s, then call delete on that vector.

James

thanks James,
that worked.


reply via email to

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