Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
sharing data in gui and to delete subplot axis

Subject: sharing data in gui and to delete subplot axis

From: muzaffar

Date: 20 Nov, 2007 15:03:32

Message: 1 of 5

Dear all,
hi,
1 .i have one gui which plots different graphs by clicking
on one update button. it is working very well for five
graphs but sixth plot which is infact with subplot to plot
three graphs in one figure. i am unable to delete axes of
this subplots and to plot next time because control is with
 the last axes of subplot(3,1,3)
2. how i can use variable within gui to share data among
different functions without using global variables

Subject: sharing data in gui and to delete subplot axis

From: Ethan

Date: 20 Nov, 2007 15:51:20

Message: 2 of 5

"muzaffar " <muzaffarbashir@yahoo.com> wrote in message
<fhut04$6l2$1@fred.mathworks.com>...
> Dear all,
> hi,
> 1 .i have one gui which plots different graphs by clicking
> on one update button. it is working very well for five
> graphs but sixth plot which is infact with subplot to plot
> three graphs in one figure. i am unable to delete axes of
> this subplots and to plot next time because control is with
> the last axes of subplot(3,1,3)

If you use handles with you plot commands, e.g., h1=subplot(3,1,3), you should
be able to access whatever you want for deletion.

> 2. how i can use variable within gui to share data among
> different functions without using global variables
>

Take a look at using nested functions.

Subject: sharing data in gui and to delete subplot axis

From: Jerome Briot

Date: 20 Nov, 2007 16:02:00

Message: 3 of 5

Ethan a écrit :

> Take a look at using nested functions.

And/or GUIDATA/GUIHANDLES functions

Jérôme

Subject: sharing data in gui and to delete subplot axis

From: muzaffar

Date: 20 Nov, 2007 17:19:10

Message: 4 of 5

sorry problem is not solved.
i have one function in gui to plot upto subplot(3,1,[1,2,3])
now i call another function to plot again subplot(3,1,3) so
three graphs but it did not workout.
i have some problem i guess to delete first the axes area
and then to call function.
i tried clear or clf but my all buttons move away too.
???????
from
muzaffar


"muzaffar " <muzaffarbashir@yahoo.com> wrote in message
<fhut04$6l2$1@fred.mathworks.com>...
> Dear all,
> hi,
> 1 .i have one gui which plots different graphs by clicking
> on one update button. it is working very well for five
> graphs but sixth plot which is infact with subplot to plot
> three graphs in one figure. i am unable to delete axes of
> this subplots and to plot next time because control is with
> the last axes of subplot(3,1,3)
> 2. how i can use variable within gui to share data among
> different functions without using global variables
>
>

Subject: sharing data in gui and to delete subplot axis

From: Ethan

Date: 20 Nov, 2007 21:28:38

Message: 5 of 5

"muzaffar " <muzaffarbashir@yahoo.com> wrote in message
<fhv4ue$4t1$1@fred.mathworks.com>...
> sorry problem is not solved.
> i have one function in gui to plot upto subplot(3,1,[1,2,3])
> now i call another function to plot again subplot(3,1,3) so
> three graphs but it did not workout.
> i have some problem i guess to delete first the axes area
> and then to call function.
> i tried clear or clf but my all buttons move away too.
> ???????
> from
> muzaffar

did you try:
h=subplot(3,1,3); delete(h);
plot new data in same place
subplot(h);plot(data)

Tags for this Thread

No tags are associated with this thread.

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.

Contact us