[Scilab-users] subplot with 2 y-axis

W.Schulz w.schulz at ove.at
Fri Oct 12 13:20:27 CEST 2012


Hello,
I try to make a subplot with 2 y-axis. I can create a single plot with 2
y-axis but as soon as I add the subplot command (currently commented in the
code below) the complete figure is distorted.
What is the problem?
Thanks 
Wolfgang

clf
Xangle  = [0. 10. 20. 30. 40. 50. 60. 70. 80. 90.];  
cntangle = [10070 29822 33857 33522 36576 29697 23576 23138 23377 20000];
meanangle = [0.281 0.910 0.116 1.598 0.255 1.089 0.111 1.497 0.397 0.933];
stdvangle = [0.281 0.910 0.116 1.598 0.255 1.089 0.111 1.497 0.397 0.933];

//subplot(2,1,1);
bar(Xangle,cntangle)
ymax=max(cntangle);
set(gca(),"data_bounds",matrix([0,100,0,ymax+100],2,-1));
a=gca();    //get the handle of the newly created axes
a.x_label.text="Angle [degrees]";
a.y_label.text="Number [ ]";
a.auto_ticks = ["on","on","on"];

a=newaxes();   
a.filled="off";

plot(Xangle,meanangle,'r-o',"MarkerSize",2,"MarkerFaceColor","r")
set(gca(),"data_bounds",matrix([0,100,-3,3],2,-1));
a.y_location = "right";
errbar(Xangle,meanangle,stdvangle/2.,stdvangle/2.);




--
View this message in context: http://mailinglists.scilab.org/subplot-with-2-y-axis-tp4025009.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list