// NewGraphCanvasB.java
 /* A Java class for
 * SingleStub.java
 * Electromagnetic Transmission Line Applet
 * Applet without Smith Chart - Prepared by Umberto Ravaioli 
 * for 6th edition of Fundamentals of Applied Electromagnetics Book
 * June 2009 - All Rights Reserved
 */   

import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.lang.*;

public class NewGraphCanvasB extends GraphCanvas{
    //private static final Color bgcolor = new Color(236,236,221);
    //private static final Color bgcolor = new Color(170,240,240);
    private static final Color bgcolor = Color.gray;
    private StateVars state;
    private static final int LeftMargin=10, RightMargin=10, TopMargin=10, BottomMargin=10;
    
    public NewGraphCanvasB(StateVars state){
	
	super();
	this.state = state;
	setBackground(bgcolor);
	setLabelAxis(true);
	setYRangeMax(1.0);
	setYRangeMin(0.0);
	plotZeroLine(false);
	plotRefPoint(true);
	setLabels("Solution # 2",""+state.frequency,"  f [ Hz ]","");
	setBand(state.G1,state.G2,state.gpos1,state.gpos2,state.BigBand2);
	setRefPoint(state.frequency_scan, state.scanpoint);
	
	plot(state.x_freq,state.G_array);
   }
   
}
