How can I move axes window by entering value in GUI?
1 次查看(过去 30 天)
显示 更早的评论
I want to move a location of axes window. When you enter values in edit place of GUI, GUI displays sevral axes windows whenever enters input values. I don't want to show up axes windows at the same time. I want to show up one axes window against one input value. The trace of input values should not be marked. The axes window should move to direction I want. How can I change following edit function code?
function edit1_Callback(hObject, eventdata, handles)
b=get(handles.edit1,'String');
c=str2num(b)
axes('units','pixels','pos',[c 180 50 50]);
0 个评论
回答(1 个)
Walter Roberson
2012-5-25
I do not understand? uicontrol('Style','edit') are not part of any axes and do not cause any axes to be created unless the callback creates an axes.
The axes() call like you show creates a new axes. If you want to modify the position of an existing axes, use set() on the axes handle. For example,
set(handles.axes3, 'position', [c 180 50 50]);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!