フィルターのクリア

How create grid name in axes???

1 回表示 (過去 30 日間)
Dominika
Dominika 2017 年 4 月 19 日
コメント済み: Dominika 2017 年 4 月 19 日
Hello, I have a problem with Xgrid and Ygrid in my GUI - Matlab 2013a. My code is:
plot(handles.axes4,t,input);
set(handles.axes4, 'XGrid', 'on');
set(handles.axes4, 'YGrid', 'on');
handles.axes4.XLabel.String = 't[s]';
handles.axes4.YLabel.String = ['input ' inputName];
in Matlab 2016 I can to see X and Y axis but in Matlab 2013a this axis is not there. Do you know where is a problem please??

採用された回答

Jan
Jan 2017 年 4 月 19 日
Matlab R2013a did not use the modern GUI handles ("HG2") and you cannot access the properties using the dot syntax:
plot(handles.axes4,t,input);
set(handles.axes4, 'XGrid', 'on');
set(handles.axes4, 'YGrid', 'on');
xlabel(handles.axes4, 't[s]');
ylabel(handles.axes4, ['input ' inputName]);
Note that "input" and "inputname" are builtin Matlab functions. Creating variables with the same name lead to confusions frequently.
  1 件のコメント
Dominika
Dominika 2017 年 4 月 19 日
Works. :) Thank you :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGrid Lines, Tick Values, and Labels についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by