[Bugzilla] [Bug 13807] Alain Lamy has commented the bug

bugzilla.admin at scilab.org bugzilla.admin at scilab.org
Sat Apr 4 08:52:02 CEST 2015


http://bugzilla.scilab.org/show_bug.cgi?id=13807
--------- Bug Summary -----------
axes margins contain some %nan or %inf

---------- Changed by ------------
Alain.Lamy at cnes.fr

---------- What changed ----------

--- Comment #4 from Alain Lamy <Alain.Lamy at cnes.fr> ---
I continued with my (limited) investigation: 

1) There is a link with the "visible" field in the figure structure: 
In the example, a figure is created invisible and made visible before changing titles and 
plotting something. 
The margins displayed (often) contains %nan or %inf values. 
(see below)   


2) It seems that (or it is as if) something was not correctly initialized. 
I tried the following workaround (the 2 following lines are executed only once): 

a = gda(); 
a.margins = 0.125 * ones(1,4); 

Then the results of the script are OK. 



-----------------------------------------------------------------------------------
Script : 
-----------------------------------------------------------------------------------

g = gdf(); 
g.visible = "off"; 

for k = 1 : 100

  f = scf(); 
  f.visible = "on"; 
  f.immediate_drawing = "off"; 

  a = gca(); 
  a.title.text = "titre"; 
  a.x_label.text = "x_label"; 
  a.y_label.text = "y_label"; 

  disp(a.margins); 

  x = linspace(0, 1, 100); 
  plot(x, sin(x)); 

  f.immediate_drawing = "on"; 
  delete(f); 

end

sdf(); 


-----------------------------------------------------------------------------------
Script output (if no workaround applied): 
-----------------------------------------------------------------------------------
    0.125    0.125    0.125    0.125  

    0.125    0.125    0.125    0.125  

    0.125    0.125    0.125    0.125  

    0.125    0.125    0.125    Nan  

    Inf    0.125    Inf    Nan  

    0.125    0.125    0.125    Nan  

    0.125    0.125    0.125    0.125  

    Inf    0.125    Inf    Nan  

    0.125    0.125    0.125    0.125  

    0.125    0.125    0.125    0.125  

    0.125    0.125    0.125    0.125  

    0.125    0.125    0.125    0.125  

    0.125    0.125    0.125    Nan  

etc...

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/bugzilla/attachments/20150404/54833519/attachment.htm>


More information about the Bugzilla mailing list