How to switch between plotting on two different axis in one gui function
조회 수: 7 (최근 30일)
이전 댓글 표시
I have a data set that includes 25 sets of time, position x, y,z forces, and torque. I am using a GUI to access all of the data and plot a portion of any two of the columns on a single plot that updates with a slider bar. I have gotten that to work great, however I now want to be able to have a second plot that will plot data similar to the first and update in the same slide bar. I am having trouble switching from one plot to the other and the data updates on the most recent plot. How can I switch between these two?
댓글 수: 2
Oliver Woodford
2019년 1월 23일
Is this already ansewered here?: https://www.mathworks.com/matlabcentral/answers/714-how-can-i-change-the-current-axes-in-a-gui
채택된 답변
Kevin Chng
2019년 1월 24일
Hi,
Put the name of your axes in the first argument of your function plot. Example :
plot(handles.axes1,[0 1],[0 1])
plot(handles.axes2,[0 3],[0 1])
댓글 수: 3
Kevin Chng
2019년 1월 25일
I'm not sure with your application, have you closed any figure? The axes might be in the figure, then later closed by you.
Therefore, the axes is deleted.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Polar Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!