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]);

回答(1 个)

Walter Roberson
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]);

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by