Info
この質問は閉じられています。 編集または回答するには再度開いてください。
I want to turn axis for my both axes. But the following code work only for axes 2. Can anyone tell why is it so?
1 回表示 (過去 30 日間)
古いコメントを表示
% if true
% code
% end
function pushbutton1_Callback(hObject, eventdata, handles)
y1=randn(40);
handles.y1=y1;
y2=randn(40);
handles.y2=y2;
guidata(hObject, handles);
function pushbutton2_Callback(hObject, eventdata, handles)
y1=handles.y1;
y2=handles.y2;
imagesc(y1,'parent',handles.axes2)
axis off
imagesc(y2,'parent',handles.axes1)
axis off
0 件のコメント
回答 (1 件)
Greg
2017 年 11 月 2 日
axis off
Operates on the "current axes" (that returned by the gca function). Nowhere in your code do you set (change) the active axes, running axis off twice produces redundant results.
As with your calls to imagesc(), supply the axes handle explicitly in your calls to axis().
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!