0
Scilab Gui axes object problem.

Hi guys

I have a problem. I created an interface using Scilab Gui. My problem is about axes object. When I change the graph using popupmenu, Chart axis does not refresh every time. Numbers on the y-axis lap over and I can not read them. I use delete(a.chidren) command, but it does not work. What can I do?

Thanks


Scilab 24-03-20, 4:59 p.m. bediaakbulut
0

A short program to reproduce the problem will help in understanding the problem better. Try "delete(gcf())" or "delete(gca())"

24-03-20, 5:09 p.m. rupakrokade
This is a short program about my problem, If you run, you can see the problem


f=figure('figure_position',[551,62],'figure_size',[942,548],'auto_resize','on','background',[8],'figure_name','Graphic window number %d','dockable','off','infobar_visible','off','toolbar_visible','off','menubar_visible','off','default_axes','on','visible','off');
//////////
handles.dummy = 0;
handles.Popupmenu1=uicontrol(f,'unit','normalized','BackgroundColor',[0.96,0.96,0.96],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','left','ListboxTop',[],'Max',[5],'Min',[0],'Position',[0.12,0.735,0.07,0.03],'Relief','default','SliderStep',[0.01,0.1],'String','200|250|300','Style','popupmenu','Value',[1],'VerticalAlignment','middle','Visible','on','Tag','Popupmenu1','Callback','Popupmenu1_callback(handles)')
handles.Popupmenu7=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','left','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.12,0.663,0.07,0.03],'Relief','default','SliderStep',[0.01,0.1],'String','No Ring|DV-20 Slot','Style','popupmenu','Value',[1],'VerticalAlignment','middle','Visible','on','Tag','Popupmenu7','Callback','Popupmenu7_callback(handles)')
handles.Pushbutton1=uicontrol(f,'unit','normalized','BackgroundColor',[-1,-1,-1],'Enable','on','FontAngle','normal','FontName','Tahoma','FontSize',[12],'FontUnits','points','FontWeight','normal','ForegroundColor',[-1,-1,-1],'HorizontalAlignment','center','ListboxTop',[],'Max',[1],'Min',[0],'Position',[0.05,0.12,0.108,0.07],'Relief','default','SliderStep',[0.01,0.1],'String','SHOW','Style','pushbutton','Value',[0],'VerticalAlignment','middle','Visible','on','Tag','Pushbutton1','Callback','Pushbutton1_callback(handles)')
handles.Axes1= newaxes();handles.Axes1.margins = [ 0 0 0 0];handles.Axes1.axes_bounds = [0.55,0,0.29,0.53];
f.visible = "on";
function Pushbutton1_callback(handles)
    format('v',6)
kav1=100
ring=get(handles.Popupmenu7,'Value')
val = get(handles.Popupmenu1,'Value')
switch (ring)
case 1
switch (val)
    case 1
        kv1=[10 30;20 95;30 290;40 600;50 795;60 900;70 950;80 1000;90 1050] 
    case 2
        kv1=[10 75;20 180;30 425;40 770;50 1090;60 1200;70 1300;80 1500;90 1800]
    case 3
        kv1=[10 44.24;20 177.19;30 484.93;40 687.85;50 950.68;60 1245.84;70 1531.31;80 1817.2;90 1880.43]
end
case 2
    switch (val)
    case 1
        kv1=[10 30;20 95;30 290;40 600;50 795;60 900;70 950;80 1000;90 1050] 
    case 2
        kv1=[10 75;20 180;30 425;40 770;50 1090;60 1200;70 1300;80 1500;90 1800]
    case 3
        kv1=[10 19.99;20 51.52; 30 105.22; 40 163.19; 50 225.49;60 361.68;70 425.21;80 490.93;90 509.25]
    end
end
handles.Axes1=newaxes()
handles.Axes1.axes_bounds =[0.55,0,0.29,0.53]
one=ones(kv1)
r=gca()
plot2d('nl',kv1(:,1),[kv1(:,2) one(:,1)*kav1])
end

24-03-20, 5:16 p.m. bediaakbulut

Login to add comment


Log-in to answer to this question.