<?php session_start(); require('graph.php'); // Get the number of entries and ranges. $n=$_SESSION['n']; $xmin=$_SESSION['time'][0]; $xmax=$_SESSION['time'][$n-1]; $ymin=$_SESSION['ymin']; $ymax=$_SESSION['ymax']; // Re-adjust the virtical scale. $ydif=$ymax-$ymin; $ymax+=0.2*$ydif; // Get text for drawing on graph $text = array( "Wavelength = ".$_SESSION['lambda']." microns", "Semi-major axis = ".$_SESSION['a']." AU", "Eccentricity = ".$_SESSION['e'], "Inclination = ".$_SESSION['i']." degrees", "Argument of periastron = ".$_SESSION['lomega']." degrees", "Longitude of ascending node = ".$_SESSION['bomega']." degrees" ); // Initialize graphics and text drawing $xpixels=801; $ypixels=501; $x1=30; $x2=30; $y1=30; $y2=30; $ndx=0; $ndy=0; $textfont=3; $textpixlen=strlen($text[5])*imagefontwidth($textfont); $textxoffset=$xpixels-$textpixlen-$x2-5; $textysep=imagefontheight($textfont)+2; $textyoffset=$y1+2; $graph = new Graph($xpixels, $ypixels, $x1, $x2, $y1, $y2, $xmin, $xmax, $ndx, $ymin, $ymax, $ndy); $graph->drawxticks(0, 1, 30, TRUE, 2); $graph->drawyticks(0, 1, 30, TRUE, 2); $graph->drawxticks(1, 1, 30, TRUE, 0); $graph->drawyticks(1, 1, 30, TRUE, 0); $graph->drawtitle("Extrasolar Giant Planet Lightcurve"); $graph->drawxtitle("Time (Years)"); $graph->drawytitle("Log Planet/Star Flux Ratio"); $graph->plotcurve($_SESSION['time'],$_SESSION['logratio'],$n-1); $graph->fillrect($textxoffset-5,$xpixels-33,$textyoffset, 6*$textysep+$textyoffset,"#CFFFCF"); $graph->drawrect($textxoffset-5,$xpixels-33,$textyoffset, 6*$textysep+$textyoffset,"#FF0000"); for ($i=0; $i<6; $i++) $graph->drawtext($text[$i], $textxoffset, $i*$textysep+$textyoffset, TRUE, TRUE, $textfont); $graph->display(); ?>