GUI axes question, need help having a minimal and maximal edit box for the x axes values
조회 수: 2 (최근 30일)
이전 댓글 표시
How would I be able to change the value of the x axes in a GUI for a plot using two edit boxes-a minimal x value box and a maximal x value box?
댓글 수: 0
채택된 답변
Rik
2019년 7월 21일
Set the XLim property of the axes object in a callback.
Make sure not to forget to use str2double, to check for NaN input, to insert default values for missing fields, and to make sure that the max is larger than the min.
댓글 수: 2
Rik
2019년 7월 21일
You can use something like this:
h=guidata(hObject); set(h.axes1,'XLim', [1 9])
Does that help?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!