フィルターのクリア

GUI axes question, need help having a minimal and maximal edit box for the x axes values

1 回表示 (過去 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?

採用された回答

Rik
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 件のコメント
Caitlin Schmidt
Caitlin Schmidt 2019 年 7 月 21 日
Could you provide an example? i have never used the XLim property before and am wondering how I should be implementing it. Thank you!
Rik
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 ExchangeGraphics Object Programming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by