<html xmlns="http://www.w3.org/1999/xhtml">
<head>



<title></title>
<script type="text/javascript">
    var theLanguage = parent.theLanguage;
    var pathPrefix = "../../"; // path to base directory
    function addText(x,y){return(theLanguage=="en")?x:y}
    

</script>
<script type="text/javascript" src = "../../globalScripts.js">
</script>
<script type="text/javascript" src = "../../utilsV5.js">
</script>
<script type="text/javascript" src = "../../SVGGrapher/SVGGraphV1_4.js"></script>
<script type="text/javascript">
//<![CDATA[
graphDocNameGiven = true;
var theDocObj=document;
var grapher1 = new grapher("grapher1",172, 300);
with(grapher1) {
				// tracing info
				tracing=true;
				traceStep=1;
				decPlacesX=0; // for displaying coords
				decPlacesY=0;
				// end of tracing info
				
    curvesColors = ["royalblue","green","grey","#EF181F","royalblue", "#A225A8", "green","#8469A7","#E85275","green","magenta","magenta"];
	clipMargins=[5,5,5,5]; // to allow for arrow-heads and xs on the edge
	curveWt = 1;
	gridWt = .5;
	axisWt=1;
	clickAccX=.5;
	clickAccY=500;
	decPlacesY=1;
	decPlacesY=0;
	isPopup=false;
	popupURL="graphWindow.html"
	pointsPerCurve = 1000;

    
	coordsColor ="black";
	gridColor = "silver";
	pointsColor = "royalblue";
	pointsWt = 1;
	backgroundColor = "white";
	surroundColor = "transparent";
	borderColor="teal";
	yGrid = "on";
	xGrid = "on";
	xGridStep = 1;
	yGridStep =1;
	nudgeXValsY=-2;
	nudgeXValsX=0;
	nudgeYValsX=-1;
	nudgeYValsY=1;
	
	xAxis = "on";
	yAxis = "on";
	xAxisColor="silver";
	yAxisColor="silver";
	//xAxisPosn=window[2];
	//yAxisPosn=window[0];
	showScalex=false;
	showScaley=false;
    yValuesShown=[-1];
	//xValuesRange=[-3,3];
	//yValuesRange=[-4,2];
	
	xAxisLabel='x';
	yAxisLabel='y';
	xAxisLabelPosn='right';
	yAxisLabelPosn='top';
	xAxisLabelStyle= yAxisLabelStyle="font-style:italic;font-size:14px"

	edgeBuffer = 2;
	leftMargin=2;
	rightMargin=5;
	topMargin=5;
	bottomMargin=2;
	ifrMargin=20;
	window = [-3,5,-6,8];
	xLabelFontSize=yLabelFontSize=12;
	arrowLength=15;

	draggableBars = 0;
	//plottedPointsX=[,0,1];
	//lottedPointsY=[,-1,1];
	plottedCurves=[["2x-1",-6,6,"arrow","arrow",
	[[-2,-1,"blue",0.3,-5,"blue",0.2],[-1,1,"green",0.3,-3,"green",0.2],[1,4,"red",0.3,1,"red",0.2]]]
	];
	// format:  [string, xMin, xMax,"dot/circle/arrow","dot/circle/arrow", [ shading from arrays ]  ]
// each shading array is [leftlimit, rightlimit, color, transparency, shade-to-value, border color, border trnaparency ]
// Fix 06: shade-to-value can be a number or string that evaluates to a number,
//    or [curve-number], which implements shade-to-curve
// eg [parent.intLimitsQ15[2],parent.intLimitsQ15[1],col2,.7,0,"",".7"]
	//alert(plottedCurves[0])
	tracing = 1;
	traceColor = "firebrick";
	stopOnCutoff=true;
	}
xHeight = 4;
dotRadius=4;
var deltaYShift=(SAFJS)? 2:0;
yAxisPosn



function initialActions() {
setUpGraph(grapher1);
var graphDoc = getDoc (grapher1);
var graphElt= graphDoc.getElementById("myGraph");

graphElt.setAttributeNS(null,"viewBox"," 0 0 " + grapher1.totWdth + " " + grapher1.totHt);


plotAllCurves(grapher1);

//**** FOR NExT GRAPH:
//putSegment(grapher1, 1,-1, 1,1,"maroon",1,"","","arrow");



//**** FOR NExT GRAPH
// function putHtml(G,  inString, x1,y1, offsetX, offsetY, areScreenCoords,inGraphDoc)
//putHtml(grapher1,  '<span style="color:green">&#916;<i>x</i> = 1</span>', 0.8,-2.2, 0,0, false,true); // Delta x = 1
//putHtml(grapher1,  '1', .5,-7, 0,0, false,true);  // Delta y = 2


// putText(theGraph, inStr, theStyle, theFontSize,  x1,y1, offsetX, offsetY, areScreenCoords, overrideBorders,bgColor,centering,isForAxes,isTex,heightFactor)

putText(grapher1, '1', "font-size:12px;fill:blue", 0, -1.5,-6, 0, 0);
putText(grapher1, '2', "font-size:12px;fill:blue", 0, -0.8,-4.6, 0, 0);

putText(grapher1, '2', "font-size:12px;fill:darkgreen", 0, 0,-4, 0, 0);
putText(grapher1, '4', "font-size:12px;fill:darkgreen", 0, 1.2,-1.6, 0, 0);

putText(grapher1, '3', "font-size:12px;fill:darkred", 0, 2.5,0.1, 0, 0);
putText(grapher1, '6', "font-size:12px;fill:darkred", 0, 4.3,3.4, 0, 0);




//
//putDot(theGraph, x1,y1, color,isOpen, radius,fillColor) 
plotPoints(grapher1, "x", false, '')
//showSVG(grapher1)

}





// NOTE
// onmousedown="if (event.preventDefault) event.preventDefault()"
// the above prevents the SVG image from being dragged around in Firefox and some other browsers
//]]>
</script>
</head>
<body onload="initialActions()">
<div id = "scratch" style="font-size:5px"></div><span id = "ruler"></span>
<div id="grapher1Div" style="margin-top:0px;margin-bottom:0px">
<svg xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink" 
  width="200" height="350" id="myGraph">
<defs id="graphdefs_grapher1">
<marker id="arrowHead_grapher1" viewBox="0 0 10 10" refX="10" refY="5" 
    markerUnits="strokeWidth" orient="auto"
    markerWidth="40" markerHeight="20">
    <polyline id="myArr_grapher1" points="0,0 10,5 0,10 3,6 0,5 3,4" />
</marker>	
<marker id="guideArrow_grapher1" viewBox="0 0 10 10" refX="10" refY="5" 
    markerUnits="strokeWidth" orient="auto"
    markerWidth="18" markerHeight="9">
    <polyline id="myArr2_grapher1" points="0,0 10,5 0,10 3,6 0,5 3,4" fill="grey" />
	
</marker>
<clipPath id="rectClip_grapher1">
    <rect id="cliprect_grapher1" width="200" height="350" x="25" y="25" fill="white" />
    <!-- The above is adjusted by the js in SVGGraph --> 
</clipPath>
</defs>

<g id="firstGroup_grapher1">
	<rect id="gSurround_grapher1" width="200" height="250" x="0" y="0" fill="lightblue"  style="cursor:crosshair"/>
	<rect id="grid_grapher1" width="150" height="200" x="25" y="25" fill="white"  style="cursor:crosshair"/>
</g>
<g id="dots_grapher1">
</g>
<g id="gridGroup_grapher1">
</g>
<g id="curves_grapher1">
</g>

<g id="squares_grapher1">
</g>
<g id="xs_grapher1">
</g>
<g id="tracepoint_grapher1">
</g>
<g id="lines_grapher1">
</g>
<g id="polygons_grapher1">
</g>
<g id="arcs_grapher1">
</g>
</svg>
<div id="grapher1MathContainer"></div>
</div>

<center style="margin-left:-50px">
       <button id="lefttrace" onmousedown="delayTrace(grapher1,0)" onmouseup="clearTimeoutsandIntervals()">&#8592;</button>
       <button id="lefttrace" onmousedown="delayTrace(grapher1,1)" onmouseup="clearTimeoutsandIntervals()">&#8594;</button>
       <span id="magicbutton"></span>
       <br />
       <span id="traceCoordsgrapher1" style="font-family:Arial;color:indianred;font-size:12px">(0,  &#160; 0)</span>
       
   </center>

<script>
    //<![CDATA[
	if(parent.showComp) document.getElementById("magicbutton").innerHTML='<button id="checkbutton" onclick="showSVG(grapher1)">SVG Source</button>';
    //]]>
</script>


<center>
<div style="position:relative;margin-left:auto;margin-right:auto">
    <button id="checkbutton" onclick="showSVG(grapher1)">SVG Source</button>
    <button id="clearbutton" onclick="location.reload()">Clear</button>&#160;
    


<div id="feedback" style="width:300px; margin-left:auto;margin-right:auto ;font-size:12px;font-family:Arial;color:indianred"></div>
</div>
</center>






</body>
</html>
