import java.io.*;
import java.awt.Color;
 
class f3 extends fi_x
{
 double[] func(double x)
 {
   double f[]=new double[2];	 
   f[0]=Math.sin(x)+x/2;
   f[1]=Math.sqrt(x);
   return f;
 }
}

class PlotT4
{
     public static void main (String args[]) throws IOException
     {
     //Plot pp=new Plot();
     String fi[]={"in.txt","out.txt"};
     f3 ff=new f3();
     int ipt[]={0,1};
     int ir[]={0,0};
     int ig[]={0,0};
     int ib[]={0,2};
     double xx[][]={{1,2,3,4,5,6},{1,2,3,4,5,6}};
     double yy[][]={{2,3,4,5,6,7},{10,9,8,7,6,5}};
     Plot pp=new Plot(xx,yy); //read data from fi (in.txt,out.txt datas are added up)
     pp.setPlotType(0,25);//
     pp.setPlotType(3,28);// 
     pp.setPlotType(2,41);//bar chart
     pp.setColor(0,255,0,0); //red
     pp.setColor(1,Color.yellow); //yellow
     pp.addFunction(ff,0.0,20.0,50,2,ipt,ir,ig,ib); //two additional function

     pp.setPlabel("Fonksiyon Plot");
     pp.setXlabel("x ekseni");
     pp.setYlabel("y ekseni");
     for(int j=0;j<pp.nline;j++)
     {
        System.out.println("n["+j+"]="+pp.n[j]+"nline="+pp.nline+"plottype="+pp.plottype[j]+"rgb="+pp.red[j]+" "+pp.green[j]+" "+pp.blue[j]);
        System.out.println("xmin"+pp.xmin+"xmax"+pp.xmax+"ymix"+pp.ymin+"ymax"+pp.ymax);        
        for(int i=0;i<pp.n[j];i++)
        {
        System.out.println(pp.x[j][i]+" "+pp.y[j][i]);
        }
     }
     pp.plot();
     }
}
