matlab:inputdlg对话框附带刻度标签

时间:2015-07-09 11:34:21

标签: matlab input dialog axis-labels

我有一个用户输入请求框,基本上是在http://www.mathworks.com/help/matlab/ref/inputdlg.html中写的matlab建议的。

prompt = {'Enter spot number'};
dlg_title = 'Input';
num_lines = 1;
def = {'9'};
answer = inputdlg(prompt,dlg_title,num_lines,def);
handles.count = str2double(answer{1});

但是,对话框带有轴标签,如下图链接所示:

http://imgur.com/yPUYTJb

编辑: 事实证明,windowsbuttonmotion函数正在做这件事。我在函数中评估它,而不是通过调用第二个函数。像这样:

function figure1_WindowButtonMotionFcn(hObject, eventdata, handles)

global loop_counter diameter

pos = get(gca, 'currentpoint'); % get mouse location on figure
x = pos(1,1); y = pos(1,2); % assign locations to x and y
set(handles.lbl_x, 'string', ['x loc:' num2str(x)]); % update text for x loc
set(handles.lbl_y, 'string', ['y loc:' num2str(y)]); % update text for y loc 
const = diameter/2;

for i = 1:loop_counter
    center(i,:) = getPosition(handles.trap(handles.unselected(i)))+const;
    if(((x-center(i,1))^2+(y-center(i,2))^2)<= const^2)
        setColor(handles.trap(handles.unselected(i)), 'red');
    else
        setColor(handles.trap(handles.unselected(i)), 'blue');
    end
end

guidata(hObject, handles)

我怎样摆脱它们?

感谢。

0 个答案:

没有答案