import java.io.*;
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 PlotT3  
{  
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};  
double yy[]={2,3,4,5,6,7};  
Plot pp=new Plot(fi); //read data from fi (in.txt,out.txt data are added up)  
//pp.addData(fi);  
pp.setPlotType(0,0);//  
pp.setPlotType(1,1);//   
pp.addData(xx,yy,0,0,0,0); //one set of addional data  
pp.setPlotType(2,41);//bar chart  
pp.setColor(2,0,0,255); //blue  
pp.addFunction(ff,0.0,20.0,50,2,ipt,ir,ig,ib); //two additional function  
pp.setPlabel("Function Plot");  
pp.setXlabel("x axis");  
pp.setYlabel("y axis");  
pp.plot();}}  
