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

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Plotting in GUI

Asked by Euan on 26 Nov 2011

I am trying to plot mulitiple graphs in a GUI.

I'm using this code

plot(x, y, 'Parent', handles.Force)

plot(a, b, 'Parent', handles.Angle)

Can anyone tell me how I can name the respective graphs Force and Angle?

Thanks

0 Comments

Euan

Products

No products are associated with this question.

2 Answers

Answer by Naz on 26 Nov 2011

1) Drug two axis objects onto the gui 2) Double click on each and change the tag property name to Force and angle resepctively.

3 Comments

Euan on 26 Nov 2011

That was my first thought but it doesn't create a graph title. Similarly I am unable to change the names of the axis

Naz on 26 Nov 2011

Can you use 'static text' object for your title? Just place it above the axis.

Naz on 26 Nov 2011

I don't understand 'Similarly I am unable to change the names of the axis'. After you double click on the axis, property inspector window should pop-up. Change the string 'axis1' to 'Force' in property 'tag'. And don't forget to save changes on the figure.

Naz
Answer by Walter Roberson on 26 Nov 2011
title(handles.Force, 'Force')
title(handles.Angle, 'Angle')

0 Comments

Walter Roberson

Contact us