<html>
<head>
<base href="http://bugzilla.scilab.org/" />
</head>
<body><br>
---------- Bug Summary ----------- <br>axes margins contain some %nan or %inf <br><br>
<br>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - axes margins contain some %nan or %inf"
href="http://bugzilla.scilab.org/show_bug.cgi?id=13807#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - axes margins contain some %nan or %inf"
href="http://bugzilla.scilab.org/show_bug.cgi?id=13807">bug 13807</a>
from <span class="vcard"><a class="email" href="mailto:Alain.Lamy@cnes.fr" title="Alain Lamy <Alain.Lamy@cnes.fr>"> <span class="fn">Alain Lamy</span></a>
</span></b>
<pre>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...</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>