Problem: plot is displayed in the whole gui window instead of in the axes object.
이전 댓글 표시
I have a function that generates a mesh and plots it. I call this function from a push button object. The generated mesh is displayed in the whole gui window, covering it completely, making the gui useless. The only way I partially solved it, was by calling 'figure' before calling the function. The outcome really baffles me. The mesh is plotted in the axes object as expected and then a blank figure is prompted. Please could anyone help?
댓글 수: 1
Walter Roberson
2015년 8월 26일
We need to see your code.
답변 (1개)
it is not a suitable way in GUI programming. just make a handles.axes1 (Axis) in your GUI and whenever you want to plot something special just make this axis as your place that MATLAB plot data.
axes(handles.axes1);
plot('WHATEVER YOU WANT TO PLOT');

댓글 수: 4
Elisavet Chatzizyrli
2015년 8월 26일
Walter Roberson
2015년 8월 26일
Better:
Do not call axes(handles.axes1);. Instead call
plot(handles.axes1, 'WHATEVER YOU WANT TO PLOT');
Elisavet Chatzizyrli
2015년 8월 26일
Walter Roberson
2015년 8월 26일
Your axes has been deleted along the way, it sounds like.
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!