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

1 Ansicht (letzte 30 Tage)
Haksun Lee
Haksun Lee am 25 Mai 2012
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]);

Antworten (1)

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

Kategorien

Mehr zu Graphics Object Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by