GUI axes question, need help having a minimal and maximal edit box for the x axes values
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Caitlin Schmidt
am 21 Jul. 2019
Kommentiert: Rik
am 21 Jul. 2019
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 Kommentare
Akzeptierte Antwort
Rik
am 21 Jul. 2019
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 Kommentare
Rik
am 21 Jul. 2019
You can use something like this:
h=guidata(hObject); set(h.axes1,'XLim', [1 9])
Does that help?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Object Programming finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!