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:
Plotting Different functions in different axes in GUI

Subject: Plotting Different functions in different axes in GUI

From: arnav kr

Date: 17 Jan, 2013 17:27:14

Message: 1 of 2

I am a new user of Matlab. I have created two functions as fn1.m and fn2.m that plots two graphs of two different mathematical functions (plot functions like surf, mesh are included in the code of those functions). Now I want to create a GUI in which there will be two push-buttons and three axes(axis1, axis2 and axis3). In axis1, I want a graphics (myfig.jpg) to be imported and the fn1.m and fn2.m plots should be plotted in axis2 and axis3 respectively when I will push the corresponding push-button. Kindly help.

Arnav

Subject: Plotting Different functions in different axes in GUI

From: Sadik

Date: 22 Jan, 2013 02:48:09

Message: 2 of 2

Hi Arnav,

You can use the axes function to make any of the axes current.

Example:

axes(handles.axes1)
plot / imagesc...
...
axes(handles.axes2)
plot / imagesc...
...
axes(handles.axes3)
plot / imagesc...
...

Best.

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