How can I move axes window by entering value in GUI?

1 view (last 30 days)
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]);

Answers (1)

Walter Roberson
Walter Roberson on 25 May 2012
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]);

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!