Hi everyone,
I face a problem, when I delete xline in figure. I want to create new xline when push the button, then remove the old xline. I use GUI button for this. When I push the button, it is work for two steps. However, when I push it third time, it is not remove the xline. Then, it works up to two steps. After that I face this problem again. Only one curve should remain in the figure. However, It holds ('Curve 2, Curve 4, Curve 5, Curve 7, Curve 9......') in the figure. If I write delete and create command in OML Command Window, I don't face any problem. I face a problem, when I call this command with function. Is this a bug about Compose ?
I am sharing this code in the below.
global second_line;
global sc_Value;
function button_callback(handle,callstate)
global second_line;
global sc_Value;
try
delete(second_line);
end
second_line=xline(get(sc_Value,'value'));
end