2 include("./data_date2.php");
3 include("../phplot.php");
4 $graph = new PHPlot(600,400);
5 $graph->SetPrintImage(0); //Don't draw the image yet
7 $graph->SetDataType("data-data-error"); //Must be called before SetDataValues
9 $graph->SetNewPlotAreaPixels(90,40,540,190);
10 $graph->SetDataValues($example_data);
12 $graph->SetXLabelType("time");
13 $graph->SetXLabelAngle(90);
14 $graph->SetXTitle("");
15 $graph->SetYTitle("Price");
16 $graph->SetYTickIncrement(20);
17 $graph->SetXTickIncrement(2679000);
18 $graph->SetXTimeFormat("%b %y");
19 $graph->SetPlotType("lines");
20 $graph->SetErrorBarShape("line");
21 $graph->SetPointShape("halfline");
22 $graph->SetYScaleType("log");
23 $graph->SetLineWidths(array(1));
24 $graph->SetPlotAreaWorld(883634400,1,915095000,140);
25 $graph->SetXDataLabelPos('none');
28 //Now do the second chart on the image
32 $graph->SetYScaleType("linear");
33 include("./data_date.php");
35 $graph->SetDataType("data-data"); //Must be called before SetDataValues
37 $graph->SetDataValues($example_data);
38 $graph->SetNewPlotAreaPixels(90,260,540,350);
39 $graph->SetDataValues($example_data);
41 $graph->SetXLabelType("time");
42 $graph->SetXLabelAngle(90);
43 $graph->SetXTitle("");
44 $graph->SetYTitle("Volume");
45 $graph->SetYTickIncrement(30);
46 $graph->SetPlotType("thinbarline");
48 //Set how to display the x-axis ticks
49 $graph->SetXTimeFormat("%b %y");
50 $graph->SetXTickIncrement(2679000);
51 $graph->SetXAxisPosition(0); //Have to reset it after log plots
53 //Set Plot to go from x = Jan 1 1998, to x = Dec 31 1998
54 // and from y = 0 to y = 90
55 $graph->SetPlotAreaWorld(883634400,0,915095000,90);