<HTML>
<div> </div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px;
padding-left: 5px; margin-left: 5px; margin-right: 0px;"> -----Original
Message-----<br />
From: Samuel Gougeon <Samuel.Gougeon@univ-lemans.fr><br />
To: users@lists.scilab.org<br />
Date: Sat, 13 Feb 2010 04:32:32 +0100<br />
Subject: Re: [scilab-Users] Plotting data with single x axis and two y
axes<br />
<br />
<div style="font-family: monospace,courier new,courier;">Hello Giri,<br />
Here is a commented example showing a way to do what you expect.<br />
There are certainly other ones, noticeably by using drawaxis()<br />
instead of | in addition to newaxes();<br />
Hope That Help<br />
Regards<br />
Samuel<br />
--------<br />
x=linspace(1,7,100);<br />
y1=sin(x);<br />
y2=cos(x)*67;<br />
<br />
clf<br />
plot2d(x,y1);<br />
xtitle("Sample with 2 different
Y-scales","X","sinus(x)")<br />
legend("sin(x)",-5,%f); // -5 => above the left top corner, no
frame<br />
a=newaxes(); // Creates a new default system of axes on the
same <br />
area of the window, and makes it the current one<br />
a.filled="off"; // the background of the graphical area should be
<br />
transparent, to leave the previous plot apparent<br />
red=color("red");<br />
plot2d(x,y2,axesflag=3,style=red); // plots new data. axesflag=3
<br />
means X at the bottom, and Y at the right<br />
// Because the default<br />
legend("67.cos(x)",[6,100],%f); // above the right
top corner, no frame<br />
a.font_color=red;
// sets color for ticks labels<br />
a.axes_visible=["off","on","off"]; //
cancels x axis (else red)<br />
a.y_label.font_foreground=red; // sets color for y-label<br />
a.y_label.text="67.Cosinus(x)"; // set y label</div>
</blockquote>
<div> </div>
<div>Hello friends:</div>
<div>While the solution given by Mr Gougeon works excellently on Scilab 5 at
work I have use an old solaris 8 computer running Scilab 4.0 (RC). This
version of scilab does not recognize the "filled" attribute for
newaxes(). The second plot simply over writes the first
one. Is there any way of making the second one
"transparent" after the plot is completed? </div>
<div>Thanking you.</div>
<div>Sincerely,</div>
<div>Giridhar</div>
<div> </div>
<br>----------------------------------------------------------------<br>
This mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. LEOS has taken every reasonable precaution to remove any viruses however you should also carry out your own virus checks before opening the e-mail or attachment. <br>
</HTML>