how to plot the graph using MATLAB guide?

조회 수: 6 (최근 30일)
raghavendra kandukuri
raghavendra kandukuri 2019년 2월 21일
댓글: Perez 2021년 4월 23일
Is there a way to plot the graph using Guide, i have a .fig file which i created using Guide, it has few drop downs and push buttons, i am just looking a way to incoporate a graph there.

채택된 답변

Walter Roberson
Walter Roberson 2019년 2월 21일
Yes, for sure. Open the .fig in GUIDE and use GUIDE to add an axes and take note of the tag. Then create a "plot" pushbutton. In the callback for the new pushbutton, use
axes(handles.TAG_OF_AXES_GOES_HERE);
and then you can plot your data. See also Sharing variables
Example:
axes(handles.MyGUI_axes1);
x = handles.x_to_plot;
y = handles.y_to_plot;
plot(x, y)
  댓글 수: 2
raghavendra kandukuri
raghavendra kandukuri 2019년 2월 21일
Thank you @ Walter
Perez
Perez 2021년 4월 23일
Hello, I am going to make a GUIDE, I have a graph and I would like that when I clicked the pushbutton it would reflect the graph with these points (3,10) (6,15) (9,25) , how would the code be?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by