Thread Subject:
delete graphic in to an axis

Subject: delete graphic in to an axis

From: Milan

Date: 12 Aug, 2012 17:13:07

Message: 1 of 4

Hi all

I have one axis with tri graphics:
sin(x), cos(x) and tan(x).

Is there a command that deletes a single graph??

Subject: delete graphic in to an axis

From: Rob Campbell

Date: 12 Aug, 2012 18:03:07

Message: 2 of 4


> Is there a command that deletes a single graph??
Is this what you want to do?

clf
x=(-pi:0.1:pi);
A=plot(sin(x));
hold on
B=plot(cos(x),'-r');
C=plot(tan(x),'-g');
hold off

%then:
delete(C)

Subject: delete graphic in to an axis

From: dpb

Date: 12 Aug, 2012 18:10:01

Message: 3 of 4

On 8/12/2012 12:13 PM, Milan wrote:
> Hi all
>
> I have one axis with tri graphics:
> sin(x), cos(x) and tan(x).
>
> Is there a command that deletes a single graph??

delete() on the appropriate line object handle.

Easiest if you saved the (optional) handles when creating the plot;
otherwise you'll have to query the axes object and find the proper line
handle that way.

--

Subject: delete graphic in to an axis

From: Milan

Date: 12 Aug, 2012 18:11:07

Message: 4 of 4

Yeah, this is OK!

Thanks Rob Campbell

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
2d graphics Milan 12 Aug, 2012 13:14:08
rssFeed for this Thread

Contact us