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


0
Happy for visit here this very nice post sync settings windows 10 online thanks a lot.
18-07-21, 11:51 p.m. ovile9080


0
I am really crazy about Idle Mining Empire. I play it all the time when I have free time and now I have become a mining billionaire
09-02-22, 3:01 p.m. Hannahis


0
I have researched and searched about it, your information is useful to me drift boss
10-05-22, 8:56 a.m. maseuty


0
Thank you for your post. I have read through several similar topics! However, your article gave me a very special impression, unlike other articles. I hope you continue to have valuable articles like this or more to share with everyone! retro games
25-07-22, 2:51 p.m. chunmin89


0
I’ve been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before. blue diamond dog food comparison
15-11-22, 3:14 p.m. albinamuro2


0
Good post but I was wondering if you could write a litte more on this subject? I’d be very thankful if you could elaborate a little bit further. Appreciate it! pet lifestyle
19-07-23, 5:30 p.m. albinamuro2


0
Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers. cat breeds
30-08-23, 1:08 p.m. albinamuro2


Log-in to answer to this question.