Graph.html
190 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><style type="text/css">
<!--
A:link {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: none; color: #000000}
A:visited {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: none; color: #000000}
A:hover {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: underline; color: #FF0000}
A.no:link {font-family:inherit; font-size: inhreit;text-decoration: none; color: #000000}
A.no:visited {font-family:inherit; font-size: inherit;text-decoration: none; color: #000000}
A.no:hover {font-family:inherit; font-size: inherit;text-decoration: none; color: #000000}
th {font-family: helvetica, arial; color : black; font-size:90%; background : #b7c8b7; border-right:black solid 1pt; border-bottom:black solid 1pt;}
td {font-family: helvetica, arial; color : black; font-size:90%; background : white; border-right:black solid 1pt; border-bottom:black solid 1pt;}
//-->
</style></HEAD><hr><div style="padding-left:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;background-color:#deaa87;font-family:courier new;font-size:16pt;">Class <a class="no" name="_C_GRAPH"><b>Graph</b></a></div>
<i>(Defined in: jpgraph.php : 491)</i><br> <br><table cellspaceing=0 cellpadding=4 style="border:solid #303030 1px;"><tr><td align="center" style="background:lightgray;" > <a href="Graph.html" style="font-family:arial;font-weight:bold;color:darkblue;">Graph</a> </td></tr><tr><td valign=top> <a href="Graph.html#_GRAPH_ADD">Add()</a> <br>
<a href="Graph.html#_GRAPH_ADDBAND">AddBand()</a> <br>
<a href="Graph.html#_GRAPH_ADDLINE">AddLine()</a> <br>
<a href="Graph.html#_GRAPH_ADDTEXT">AddText()</a> <br>
<a href="Graph.html#_GRAPH_ADDY">AddY()</a> <br>
<a href="Graph.html#_GRAPH_ADDY2">AddY2()</a> <br>
<a href="Graph.html#_GRAPH_CHECKCSIMCACHE">CheckCSIMCache()</a> <br>
<a href="Graph.html#_GRAPH_GETCSIMIMGHTML">GetCSIMImgHTML()</a> <br>
<a href="Graph.html#_GRAPH_GETHTMLIMAGEMAP">GetHTMLImageMap()</a> <br>
<a href="Graph.html#_GRAPH_SET3DPERSPECTIVE">Set3DPerspective()</a> <br>
<a href="Graph.html#_GRAPH_SET90ANDMARGIN">Set90AndMargin()</a> <br>
<a href="Graph.html#_GRAPH_SETALPHABLENDING">SetAlphaBlending()</a> <br>
<a href="Graph.html#_GRAPH_SETANGLE">SetAngle()</a> <br>
<a href="Graph.html#_GRAPH_SETAXISLABELBACKGROUND">SetAxisLabelBackground()</a> <br>
<a href="Graph.html#_GRAPH_SETAXISSTYLE">SetAxisStyle()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDCFLAG">SetBackgroundCFlag()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDCOUNTRYFLAG">SetBackgroundCountryFlag()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDGRADIENT">SetBackgroundGradient()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDIMAGE">SetBackgroundImage()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDIMAGEMIX">SetBackgroundImageMix()</a> <br>
<a href="Graph.html#_GRAPH_SETBACKGROUNDIMAGEPOS">SetBackgroundImagePos()</a> <br>
<a href="Graph.html#_GRAPH_SETBOX">SetBox()</a> <br>
<a href="Graph.html#_GRAPH_SETCLIPPING">SetClipping()</a> <br>
<a href="Graph.html#_GRAPH_SETCOLOR">SetColor()</a> <br>
<a href="Graph.html#_GRAPH_SETCSIMIMGALT">SetCSIMImgAlt()</a> <br>
<a href="Graph.html#_GRAPH_SETFRAME">SetFrame()</a> <br>
<a href="Graph.html#_GRAPH_SETFRAMEBEVEL">SetFrameBevel()</a> <br>
<a href="Graph.html#_GRAPH_SETGRIDDEPTH">SetGridDepth()</a> <br>
<a href="Graph.html#_GRAPH_SETICONDEPTH">SetIconDepth()</a> <br>
<a href="Graph.html#_GRAPH_SETIMGFORMAT">SetImgFormat()</a> <br>
<a href="Graph.html#_GRAPH_SETMARGIN">SetMargin()</a> <br>
<a href="Graph.html#_GRAPH_SETMARGINCOLOR">SetMarginColor()</a> <br>
<a href="Graph.html#_GRAPH_SETSCALE">SetScale()</a> <br>
<a href="Graph.html#_GRAPH_SETSHADOW">SetShadow()</a> <br>
<a href="Graph.html#_GRAPH_SETTEXTSCALEABSCENTEROFF">SetTextScaleAbsCenterOff()</a> <br>
<a href="Graph.html#_GRAPH_SETTICKDENSITY">SetTickDensity()</a> <br>
<a href="Graph.html#_GRAPH_SETTITLEBACKGROUND">SetTitleBackground()</a> <br>
<a href="Graph.html#_GRAPH_SETTITLEBACKGROUNDFILLSTYLE">SetTitleBackgroundFillStyle()</a> <br>
<a href="Graph.html#_GRAPH_SETUSERFONT">SetUserFont()</a> <br>
<a href="Graph.html#_GRAPH_SETUSERFONT1">SetUserFont1()</a> <br>
<a href="Graph.html#_GRAPH_SETUSERFONT2">SetUserFont2()</a> <br>
<a href="Graph.html#_GRAPH_SETUSERFONT3">SetUserFont3()</a> <br>
<a href="Graph.html#_GRAPH_SETY2ORDERBACK">SetY2OrderBack()</a> <br>
<a href="Graph.html#_GRAPH_SETY2SCALE">SetY2Scale()</a> <br>
<a href="Graph.html#_GRAPH_SETYDELTADIST">SetYDeltaDist()</a> <br>
<a href="Graph.html#_GRAPH_SETYSCALE">SetYScale()</a> <br>
<a href="Graph.html#_GRAPH_STROKE">Stroke()</a> <br>
<a href="Graph.html#_GRAPH_STROKECSIM">StrokeCSIM()</a> <br>
<a href="Graph.html#_GRAPH_STROKECSIMIMAGE">StrokeCSIMImage()</a> <br>
<a href="Graph.html#_GRAPH_STROKEFRAMEBACKGROUND">StrokeFrameBackground()</a> <br>
<a href="Graph.html#_GRAPH_STROKESTORE">StrokeStore()</a> <br>
<a href="Graph.html#_GRAPH___CONSTRUCT">__construct()</a> <br>
</td></tr></table> <p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>The Graph class is the main container class for all x,y-axis based plots which controls the creation of the entire graph. You must always instantiate one instance to create a graph. Through this class one controls many overall settings of the image displayed.
<p>
Please note that to create Pie, Gantt, Canvas and Spider charts you have to use their respective creation classes.
<p>
Public properties:
<table width=80% border=1>
<tr><th width=20%>Name</th><th width=20%>Type</th><th>Description</th></tr>
<tr>
<td>xaxis</td>
<td>Axis</td>
<td>X-axis</td>
</tr>
<tr>
<td>yaxis</td>
<td>Axis</td>
<td>Y-axis</td>
</tr>
<tr>
<td>xgrid</td>
<td>Grid</td>
<td>Grid lines for X-axis</td>
</tr>
<tr>
<td>ygrid</td>
<td>Grid</td>
<td>Grid lines for Y-axis</td>
</tr>
<tr>
<td>legend</td>
<td>Legend</td>
<td>Properties for legend box</td>
</tr>
<tr>
<td>title</td>
<td>Text</td>
<td>Graph main title</td>
</tr>
<tr>
<td>subtitle</td>
<td>Text</td>
<td>Sub title</td>
</tr>
<tr>
<td>subsubtitle</td>
<td>Text</td>
<td>Sub title</td>
<tr>
<tr>
<td>tabtitle</td>
<td>GraphTabTitle</td>
<td>Option Tab title for graph</td>
</tr>
<tr>
<td>img</td>
<td>RotImage</td>
<td>The image canvas</td>
</tr>
</table>
<p>
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="Axis.html">Axis</a>, <a href="Grid.html">Grid</a>, <a href="Text.html">Text</a> and <a href="Image.html">Image</a> <p> <hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_ADD"><span style="color:#555555;">Graph ::</span><br><b>Add</b>($aPlot)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Add any plot object to the graph</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aPlot</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Each plot that should be displayed within the graph has to be added to the graph. This is the main method to add object. You can use this method to add
<ul>
<li> Plots
<li> Texts
<li> Plot lines
<li> Plot bands
</ul>
This method will add a plopt for use with the ?Left? Y-scale, (the normal Y scale). To add a plot to the second Y scale you should use AddY2().
<p>
Note that since the plot is added as a reference any changes you make to the original plot will also happen to the plot you have added to the graph.
<p>
Add() will always add plots to the first Y-scale. If you are using two Y-axis then you must use AddY2() to add plots to the second Y-scale.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_ADDY2">Graph::AddY2()</a><li><a href="Graph.html#_GRAPH_SETSCALE">Graph::SetScale()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph </span><span style="color: #007700">= new </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">300</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">,</span><span style="color: #DD0000">"auto"</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">img</span><span style="color: #007700">-></span><span style="color: #0000BB">SetMargin</span><span style="color: #007700">(</span><span style="color: #0000BB">40</span><span style="color: #007700">,</span><span style="color: #0000BB">30</span><span style="color: #007700">,</span><span style="color: #0000BB">20</span><span style="color: #007700">,</span><span style="color: #0000BB">40</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">"textlin"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetShadow</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">// Create a bar pot<br /></span><span style="color: #0000BB">$bplot </span><span style="color: #007700">= new </span><span style="color: #0000BB">BarPlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$bplot</span><span style="color: #007700">-></span><span style="color: #0000BB">SetFillColor</span><span style="color: #007700">(</span><span style="color: #DD0000">"orange"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Add</span><span style="color: #007700">(</span><span style="color: #0000BB">$bplot</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Display the graph<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Stroke</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_ADDBAND"><span style="color:#555555;">Graph ::</span><br><b>AddBand</b>($aBand, $aToY2)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Add vertical or horizontal band</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBand</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aToY2</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">false</span>
</span>
</td><td>Add object to Y2 axis</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>A plot may have one or several filled horizontal or vertical "bands" to emphasise certain scale areas.
<p>
Each band is an instance of the PlotBand class. For types of plot band see the documentation of class PlotBand
<p>
Note: You can alos use the standard method Add() to add bands. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="PlotBand.html#_PLOTBAND___CONSTRUCT">PlotBand::__construct()</a><li><a href="Graph.html#_GRAPH_ADD">Graph::Add()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddBand</span><span style="color: #007700">(new </span><span style="color: #0000BB">PlotBand</span><span style="color: #007700">(</span><span style="color: #0000BB">HORIZONTAL</span><span style="color: #007700">,</span><span style="color: #0000BB">BAND_RDIAG</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #DD0000">"max"</span><span style="color: #007700">, </span><span style="color: #DD0000">"red"</span><span style="color: #007700">, </span><span style="color: #0000BB">2</span><span style="color: #007700">));</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_ADDLINE"><span style="color:#555555;">Graph ::</span><br><b>AddLine</b>($aLine, $aToY2)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Add a line object (class PlotLine) to the graph</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aLine</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aToY2</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">false</span>
</span>
</td><td>Add line to Y2 axis</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Add a vertical or horizontal line to the graph. The line will extend over the entire length of the plot. The plot object is an instance of the PlotLine class
<p>
Note: You can alos use the standard method Add() to add lines. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="PlotLine.html#_PLOTLINE___CONSTRUCT">PlotLine::__construct()</a><li><a href="Graph.html#_GRAPH_ADD">Graph::Add()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">// Add mark graph with static lines<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddLine</span><span style="color: #007700">(new </span><span style="color: #0000BB">PlotLine</span><span style="color: #007700">(</span><span style="color: #0000BB">HORIZONTAL</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #DD0000">"black"</span><span style="color: #007700">,</span><span style="color: #0000BB">2</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddLine</span><span style="color: #007700">(new </span><span style="color: #0000BB">PlotLine</span><span style="color: #007700">(</span><span style="color: #0000BB">VERTICAL</span><span style="color: #007700">,</span><span style="color: #0000BB">3</span><span style="color: #007700">,</span><span style="color: #DD0000">"black"</span><span style="color: #007700">,</span><span style="color: #0000BB">2</span><span style="color: #007700">));</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_ADDTEXT"><span style="color:#555555;">Graph ::</span><br><b>AddText</b>($aTxt, $aToY2)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Add text object to the graph</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aTxt</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aToY2</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">false</span>
</span>
</td><td>Add text to Y2 axis</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Adds an instance of the Text class to the graph, allowing arbitrary text to be placed anywhere in the graph.
<p>
Note: You can alos use the standard method Add() to add bands.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT___CONSTRUCT">Text::__construct()</a><li><a href="Graph.html#_GRAPH_ADD">Graph::Add()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">// You can specify the position as fraction of the<br />// image width and height<br /></span><span style="color: #0000BB">$caption</span><span style="color: #007700">=new </span><span style="color: #0000BB">Text</span><span style="color: #007700">(?</span><span style="color: #0000BB">Figure 1. Temperature over time</span><span style="color: #007700">?,</span><span style="color: #0000BB">0.1</span><span style="color: #007700">,</span><span style="color: #0000BB">0.8</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$caption</span><span style="color: #007700">-></span><span style="color: #0000BB">SetFont</span><span style="color: #007700">(</span><span style="color: #0000BB">FONT1_BOLD</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddText</span><span style="color: #007700">(</span><span style="color: #0000BB">$caption</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_ADDY"><span style="color:#555555;">Graph ::</span><br><b>AddY</b>($aN, $aPlot)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Add plot to second Y-axis n</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aN</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Number of axis to add data to</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aPlot</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>This method is used to add a plot in the case the graph has multiple Y-axis. The first argument should be the index of the Y-axis. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700"><?</span><span style="color: #0000BB">php<br /></span><span style="color: #007700">include (</span><span style="color: #DD0000">"../jpgraph.php"</span><span style="color: #007700">);<br />include (</span><span style="color: #DD0000">"../jpgraph_line.php"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$datay </span><span style="color: #007700">= array(</span><span style="color: #0000BB">5</span><span style="color: #007700">,</span><span style="color: #0000BB">3</span><span style="color: #007700">,</span><span style="color: #0000BB">7</span><span style="color: #007700">,</span><span style="color: #0000BB">2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$datay2 </span><span style="color: #007700">= array(</span><span style="color: #0000BB">88</span><span style="color: #007700">,</span><span style="color: #0000BB">10</span><span style="color: #007700">,</span><span style="color: #0000BB">55</span><span style="color: #007700">,</span><span style="color: #0000BB">42</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$datay3 </span><span style="color: #007700">= array(</span><span style="color: #0000BB">255</span><span style="color: #007700">,</span><span style="color: #0000BB">35</span><span style="color: #007700">,</span><span style="color: #0000BB">745</span><span style="color: #007700">,</span><span style="color: #0000BB">244</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$datay4 </span><span style="color: #007700">= array(</span><span style="color: #0000BB">130</span><span style="color: #007700">,</span><span style="color: #0000BB">97</span><span style="color: #007700">,</span><span style="color: #0000BB">68</span><span style="color: #007700">,</span><span style="color: #0000BB">119</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Setup the graph<br /></span><span style="color: #0000BB">$graph </span><span style="color: #007700">= new </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">600</span><span style="color: #007700">,</span><span style="color: #0000BB">250</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetMargin</span><span style="color: #007700">(</span><span style="color: #0000BB">30</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">,</span><span style="color: #0000BB">20</span><span style="color: #007700">,</span><span style="color: #0000BB">20</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetMarginColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'white'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'lightgray'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">"intlin"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetYScale</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #DD0000">"lin"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetYScale</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">,</span><span style="color: #DD0000">"lin"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetYScale</span><span style="color: #007700">(</span><span style="color: #0000BB">2</span><span style="color: #007700">,</span><span style="color: #DD0000">"lin"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$p1 </span><span style="color: #007700">= new </span><span style="color: #0000BB">LinePlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$p1</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'blue'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Add</span><span style="color: #007700">(</span><span style="color: #0000BB">$p1</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$p2 </span><span style="color: #007700">= new </span><span style="color: #0000BB">LinePlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$p2</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'darkred'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddY</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">$p2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">ynaxis</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'darkred'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$p3 </span><span style="color: #007700">= new </span><span style="color: #0000BB">LinePlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$p3</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'red'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddY</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">,</span><span style="color: #0000BB">$p3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">ynaxis</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'red'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$p4 </span><span style="color: #007700">= new </span><span style="color: #0000BB">LinePlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay4</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$p4</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'blue'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddY</span><span style="color: #007700">(</span><span style="color: #0000BB">2</span><span style="color: #007700">,</span><span style="color: #0000BB">$p4</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">ynaxis</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'blue'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Output line<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Stroke</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB"><br /></span></span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_ADDY2"><span style="color:#555555;">Graph ::</span><br><b>AddY2</b>($aPlot)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Add plot to second Y-axis</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aPlot</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Works the same way as Add() but the plot is added for use with the Y2 scale (the right Y scale) instead. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_ADD">Graph::Add()</a><li><a href="Graph.html#_GRAPH_SETY2SCALE">Graph::SetY2Scale()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph </span><span style="color: #007700">= new </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">300</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">'linlin'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetY2Scale</span><span style="color: #007700">(</span><span style="color: #DD0000">'linlog'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$lineplot </span><span style="color: #007700">= new </span><span style="color: #0000BB">LinePlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddY2</span><span style="color: #007700">(</span><span style="color: #0000BB">$lineplot</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_CHECKCSIMCACHE"><span style="color:#555555;">Graph ::</span><br><b>CheckCSIMCache</b>($aCacheName, $aTimeOut)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Check if cached CSIM graph exists</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aCacheName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Cache file name</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aTimeOut</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">60</span>
</span>
</td><td>Timeout (in minutes)</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>This method is used to enable caching for graphs that use image maps (CSIM). It should be called as the first method after the creation of the Graph(). If the cached image and image map exists this will be directly sent back to the browser and script execution will stop.
<p>
This specifically means that no lines of code after this method will be executed in case the image/map is found in the cache.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_STROKECSIM">Graph::StrokeCSIM()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph </span><span style="color: #007700">= </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">300</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">CheckCSIMCache</span><span style="color: #007700">(</span><span style="color: #DD0000">'myimage01'</span><span style="color: #007700">,</span><span style="color: #0000BB">10</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// .. Lopt of code to create the image<br /><br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">StrokeCSIM</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_GETCSIMIMGHTML"><span style="color:#555555;">Graph ::</span><br><b>GetCSIMImgHTML</b>($aCSIMName, $aScriptName, $aBorder)</a></div>
<span style='font-family:arial;font-size:95%;'><i></i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aCSIMName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aScriptName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'auto'</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBorder</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">0</span>
</span>
</td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_GETHTMLIMAGEMAP"><span style="color:#555555;">Graph ::</span><br><b>GetHTMLImageMap</b>($aMapName)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Get a complete <MAP>..</MAP> tag for the final image map</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aMapName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Image map name</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>When you are using image maps for a plot then this routine is called in your script to get the resulting image map as a string for the graph. The image map is given the name specified as the first argument to the method.
<p>
Please note that due to the way client side image maps work you need to have both the image map and the image available in the script that is sent back to the browser. Since you can't do this at the same time you will have to create an image to disk and read the image map. The you have to stream the HTML page with an <img> tag to load the previously generated image as well as the image map.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">// The image must be stroked to find out the image maps<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Stroke</span><span style="color: #007700">(</span><span style="color: #0000BB">$myfile</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Then read the image map<br /></span><span style="color: #0000BB">$imagemap </span><span style="color: #007700">= </span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">GetHTMLImageMap</span><span style="color: #007700">(</span><span style="color: #DD0000">'MainMap'</span><span style="color: #007700">);<br /><br />echo </span><span style="color: #0000BB">$imagemap</span><span style="color: #007700">;<br />echo </span><span style="color: #DD0000">"<img src=$myfile>"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SET3DPERSPECTIVE"><span style="color:#555555;">Graph ::</span><br><b>Set3DPerspective</b>($aDir, $aHorizon, $aSkewDist, $aQuality, $aFillColor, $aBorder, $aMinSize, $aHorizonPos)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Enable image perspective transformation</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aDir</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Direction for 3D perspective</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aHorizon</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">100</span>
</span>
</td><td>Distance (in pixels) from the bottom of the image to the horizon</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aSkewDist</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">120</span>
</span>
</td><td>Skew distance (in pixels) on the horizon</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aQuality</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">false</span>
</span>
</td><td>Boolean. High quality =</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFillColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'#FFFFFF'</span><span style="color: #0000BB"></span>
</span>
</td><td>What fill color to use</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBorder</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">false</span>
</span>
</td><td>Boolean. Border around?</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aMinSize</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>Boolean. Make the transformed image canvas as small as possible</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aHorizonPos</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">0.5</span>
</span>
</td><td>Distance from left on the horizon for the point of focus</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Enable final image perspective transformation before sending the image back to the browser. This makes a "skewing" tansformation of the image to emulate a 3D depth.
<p>
Allowed argument for $aDir are
<ol>
<li>'SKEW3D_UP'
<li>'SKEW3D_DOWN'
<li>'SKEW3D_LEFT'
<li>'SKEW3D_RIGHT'
</ol>
<i>$aHorizon</i> Determines how far away the horizon are from the bottom of the picture (in pixels)
<p>
<i>aSkewDist</i> How far to the right on the horizon is the
"skewing point", a large value gives a very strong for-shortening.
<p>
<i>aQuality</i> Use high quality (takes longer time) TRUE or FALSE
<p>
<i>aFIllColor</i> Fill background color in the image on places where the original image no longer cover the entire canvas.
<p>
<i>aBorder</i> Border around or not
<p>
<i>aMinSize</i> Just make the image as large as it has to be. TRUE or FALSE. If this argument is set to false then the original image size will be preserved.
<p>
<i>aHorizonPos</i>How far, in fraction, should the point of focus be from the left edge of the image. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Set3DPerspective</span><span style="color: #007700">(</span><span style="color: #0000BB">SKEW3D_UP</span><span style="color: #007700">,</span><span style="color: #0000BB">100</span><span style="color: #007700">,</span><span style="color: #0000BB">120</span><span style="color: #007700">,</span><span style="color: #0000BB">true</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SET90ANDMARGIN"><span style="color:#555555;">Graph ::</span><br><b>Set90AndMargin</b>($lm, $rm, $tm, $bm)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Rotate the graph 90 degrees and set the margins</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$lm</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">0</span>
</span>
</td><td>Left margin</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$rm</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">0</span>
</span>
</td><td>Right Margin</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$tm</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">0</span>
</span>
</td><td>Top margin</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$bm</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">0</span>
</span>
</td><td>Bottom margin</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Rotates the graph 90 degrees and sets the margin as specified.
<p>
Remember that when rotating the graph it might be a good idea to adjust the axis so that the alignment of the labels for x and Y axis. For example by setting them as:
<p>
$graph->xaxis->SetLabelAlign('right','center','right');
<br>
$graph->yaxis->SetLabelAlign('center','bottom');
<p>
Note: This is slightly different from using SetAngle() and SetMargin() in that this method automatically adjusts the margin so that width becomes height and vice versa due to the rotation.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_SETANGLE">Graph::SetAngle()</a><li><a href="Graph.html#_GRAPH_SETMARGIN">Graph::SetMargin()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph </span><span style="color: #007700">= new </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">300</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">,</span><span style="color: #DD0000">"auto"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">'linlin'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Set90AndMargin</span><span style="color: #007700">(</span><span style="color: #0000BB">40</span><span style="color: #007700">,</span><span style="color: #0000BB">40</span><span style="color: #007700">,</span><span style="color: #0000BB">40</span><span style="color: #007700">,</span><span style="color: #0000BB">40</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetShadow</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">title</span><span style="color: #007700">-></span><span style="color: #0000BB">Set</span><span style="color: #007700">(</span><span style="color: #DD0000">"A 90 degrees rotated scatter plot"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">title</span><span style="color: #007700">-></span><span style="color: #0000BB">SetFont</span><span style="color: #007700">(</span><span style="color: #0000BB">FF_FONT1</span><span style="color: #007700">,</span><span style="color: #0000BB">FS_BOLD</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Adjust the label align for X-axis so they look good rotated<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">xaxis</span><span style="color: #007700">-></span><span style="color: #0000BB">SetLabelAlign</span><span style="color: #007700">(</span><span style="color: #DD0000">'right'</span><span style="color: #007700">,</span><span style="color: #DD0000">'center'</span><span style="color: #007700">,</span><span style="color: #DD0000">'right'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Adjust the label align for Y-axis so they look good rotated<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">yaxis</span><span style="color: #007700">-></span><span style="color: #0000BB">SetLabelAlign</span><span style="color: #007700">(</span><span style="color: #DD0000">'center'</span><span style="color: #007700">,</span><span style="color: #DD0000">'bottom'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$sp1 </span><span style="color: #007700">= new </span><span style="color: #0000BB">ScatterPlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay</span><span style="color: #007700">,</span><span style="color: #0000BB">$datax</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$sp1</span><span style="color: #007700">-></span><span style="color: #0000BB">mark</span><span style="color: #007700">-></span><span style="color: #0000BB">SetType</span><span style="color: #007700">(</span><span style="color: #0000BB">MARK_FILLEDCIRCLE</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$sp1</span><span style="color: #007700">-></span><span style="color: #0000BB">mark</span><span style="color: #007700">-></span><span style="color: #0000BB">SetFillColor</span><span style="color: #007700">(</span><span style="color: #DD0000">"red"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$sp1</span><span style="color: #007700">-></span><span style="color: #0000BB">mark</span><span style="color: #007700">-></span><span style="color: #0000BB">SetWidth</span><span style="color: #007700">(</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Add</span><span style="color: #007700">(</span><span style="color: #0000BB">$sp1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Stroke</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETALPHABLENDING"><span style="color:#555555;">Graph ::</span><br><b>SetAlphaBlending</b>($aFlg)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Eanble/disable alpha blending</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFlg</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>TRUE=Enable alpha blending</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Enable disable alpha blending. The transparency factor is specified in the color as transparency fraction. For example, to specify a red color which is 50% transparent you specify this as:
<p>
"red@0.5" (or "#FF0000@0.5")
<p>
can then use this color specification in all places where the color may be specified. If the alpha blending is not active then the alpha parameter will have no effect.
<p>
Note that the use of alpha blending requires GD 2.01 or higher. By default alpha blending is enabled.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetAlphaBlending</span><span style="color: #007700">();</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETANGLE"><span style="color:#555555;">Graph ::</span><br><b>SetAngle</b>($aAngle)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify graph angle 0-360 degrees.</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aAngle</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Rotation angle for graph</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>The graph can be rotated an arbitrary number of degrees. This will allow you to easily create, for example, horizontal bar graphs by rotating a normal bar graph 90 degrees.
<p>
See horizbarex1.php for a real life example.
<p>
Note: If you want a 90 degrees rotated graph consider using Graph::Set90AndMargin() which greatly simplifies this with just one call
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_SET90ANDMARGIN">Graph::Set90AndMargin()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph </span><span style="color: #007700">= new </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">300</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">'textlin'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetAngle</span><span style="color: #007700">(</span><span style="color: #0000BB">90</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETAXISLABELBACKGROUND"><span style="color:#555555;">Graph ::</span><br><b>SetAxisLabelBackground</b>($aType, $aXFColor, $aXColor, $aYFColor, $aYColor)</a></div>
<span style='font-family:arial;font-size:95%;'><i>// Finally stream the generated picture</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aType</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aXFColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'lightgray'</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aXColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'black'</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aYFColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'lightgray'</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aYColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'black'</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETAXISSTYLE"><span style="color:#555555;">Graph ::</span><br><b>SetAxisStyle</b>($aStyle)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify axis style (boxed or single)</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aStyle</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Style of axis</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>The most common type of axis is two axis which crosses at a specified point. However for scientific plot it is often common to want to mirror the axis (and the scale) around the plot area.
This method controls which type to use
<ul>
<li> AXSTYLE_SIMPLE, a simple two axis plots (default)
<li> AXSTYLE_BOXIN, axis around the plot area with the tick marks directed inside the plot area.
<li> AXSTYLE_BOXOUT, axis around the plot area with the tick marks directed outside of the plot area
</ul>
See funcex1.php, funcex2.php and funcex3.php for real life examples. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetAxisStyle</span><span style="color: #007700">(</span><span style="color: #0000BB">AXSTYLE_BOXIN</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETBACKGROUNDCFLAG"><span style="color:#555555;">Graph ::</span><br><b>SetBackgroundCFlag</b>($aName, $aBgType, $aMix)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Set a country flag in the background</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Index or (partial) name of Country</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBgType</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">BGIMG_FILLPLOT</span>
</span>
</td><td>Background fill type</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aMix</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">100</span>
</span>
</td><td>Mix percentage</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>[Synonym for SetBackgroundCountryFlag() )
Set a country flag in the background. All supported countries can be specified by either
<ol>
<li> Numeric index, (0-238)
<li> Full or partial name, e.g. "norway"
<li> The unique string index for the country
</ol>
For a list of all available flags please run the file "listallflags.php" in the Example directory.
<p>
The final arcgument "aMix" is a value between 0-100 and specifies the blend factor for the flag. <br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETBACKGROUNDCOUNTRYFLAG"><span style="color:#555555;">Graph ::</span><br><b>SetBackgroundCountryFlag</b>($aName, $aBgType, $aMix)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Set a country flag in the graph background</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Full or partial country name</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBgType</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">BGIMG_FILLPLOT</span>
</span>
</td><td>Normal background fill type</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aMix</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">100</span>
</span>
</td><td>Mix fraction</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Set a country flag in the background. All supported countries can be specified by either
<ol>
<li> Numeric index, (0-238)
<li> Full or partial name, e.g. "norway"
<li> The unique string index for the country
</ol>
For a list of all available flags please run the file "listallflags.php" in the Example directory.
<p>
The final arcgument "aMix" is a value between 0-100 and specifies the blend factor for the flag.
<br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETBACKGROUNDGRADIENT"><span style="color:#555555;">Graph ::</span><br><b>SetBackgroundGradient</b>($aFrom, $aTo, $aGradType, $aStyle)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Set a color gradient as the background</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFrom</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'navy'</span><span style="color: #0000BB"></span>
</span>
</td><td>Color 1</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aTo</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'silver'</span><span style="color: #0000BB"></span>
</span>
</td><td>Color 2</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aGradType</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">2</span>
</span>
</td><td>Gradient type</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aStyle</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">BGRAD_FRAME</span>
</span>
</td><td>Gardient layout style</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>This method allows you to specify a color gradient as the background of the graph. The color gradient can either fill the entire graph, just the plopt area or just the margin. This is specified by the $aStyle argument by specifyin one of the following values:
<ul>
<li>BGRAD_FRAME, Fill the entire graph with the gradient
<li>BGRAD_PLOT, Just fill the plot area
<li>BGRAD_MARGIN, Just the margin
</ul>
The gradient type can be one of
<ul>
<li>GRAD_VER, Vertical gradient
<li>GRAD_HOR, Horizontal gradient
<li>GRAD_MIDHOR, From the center and out, horizontal
<li>GRAD_MIDVER, From the center and out, vertical
<li>GRAD_WIDE_MIDVER, From the center and out, vertical. Wide mid section.
<li>GRAD_WIDE_MIDHOR, From the center and out, horizontal. Wide mid section.
<li>GRAD_CENTER, From the center and beaming out
<li>GRAD_LEFT_REFLECTION, Simulates a reflection on the left side
<li>GRAD_RIGHT_REFLECTION, Simulates a reflection on the right side
</ul>
<b>Note:</b> In order for the gradient to be visible the Frame must be enabled, i.e. graph->ShowFrame(false) will hide the gradient. If you like to hide the frame around the entire graph set the color to the margin color or set the weight of the frame line to 0.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_SETBACKGROUNDIMAGE">Graph::SetBackgroundImage()</a><li><a href="Graph.html#_GRAPH_SETFRAME">Graph::SetFrame()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetBackgroundGradient</span><span style="color: #007700">(</span><span style="color: #DD0000">'blue'</span><span style="color: #007700">,</span><span style="color: #DD0000">'navy:0.5'</span><span style="color: #007700">,</span><span style="color: #0000BB">GRAD_HOR</span><span style="color: #007700">,</span><span style="color: #0000BB">BGRAD_MARGIN</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETBACKGROUNDIMAGE"><span style="color:#555555;">Graph ::</span><br><b>SetBackgroundImage</b>($aFileName, $aBgType, $aImgFormat)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify a background image fro the plot</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFileName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Filename for background image</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBgType</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">BGIMG_FILLPLOT</span>
</span>
</td><td>Style of background image</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aImgFormat</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'auto'</span><span style="color: #0000BB"></span>
</span>
</td><td>Image format ("jpeg", "gif", "png")</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>A graph may have a background image. The image is loaded from a specified file and may be of type GIF, JPG or PNG. The image type may also be specified as "auto", in this case the image format is determined by the file ending.
<p>
The positioning and sizing of the background image can be controlled by the $aBgType parameter. Possible values are
<ul>
<li>BGIMG_FILLPLOT, Adjust the size of the image to just fit the plotarea
<li>BGIMG_FILLFRAME, ADjust the size of the image to just fit the entire graph area
<li>BGIMG_COPY, Just copy the image as is to upper left corner
<li>BGIMG_CENTER, Just copy the image but center it.
</ul>
If you want ot use a background image on a canvas graph you must be carefull. Since canvas graph use no buffering, i.e everythng is written directly in the order you specify the commands. For canvas graph the background image get's stroked when you call the Initframe() method.
SO, this call should eb among the very first. Every graph object after that will be stroked on top of the specified background image.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_SETBACKGROUNDGRADIENT">Graph::SetBackgroundGradient()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">// <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetBackgroundImage</span><span style="color: #007700">(</span><span style="color: #DD0000">"tiger_bkg.png"</span><span style="color: #007700">,</span><span style="color: #0000BB">BGIMG_FILLFRAME</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// If you use a canvas graph, and only canvas graphs,<br />// you must manually call the InitFrame() method.<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">InitFrame</span><span style="color: #007700">();</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETBACKGROUNDIMAGEMIX"><span style="color:#555555;">Graph ::</span><br><b>SetBackgroundImageMix</b>($aMix)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specifes what how much the background image should be blendid in with the background</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aMix</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Mix value (0-100)</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specifes what how much the background image should be blendid in with the background. <br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETBACKGROUNDIMAGEPOS"><span style="color:#555555;">Graph ::</span><br><b>SetBackgroundImagePos</b>($aXpos, $aYpos)</a></div>
<span style='font-family:arial;font-size:95%;'><i>// Adjust background image position</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aXpos</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aYpos</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETBOX"><span style="color:#555555;">Graph ::</span><br><b>SetBox</b>($aDrawPlotFrame, $aPlotFrameColor, $aPlotFrameWeight)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Set a frame around the plot area</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aDrawPlotFrame</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>True=Draw the frame</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aPlotFrameColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">array(</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">)</span><span style="color: #0000BB"></span>
</span>
</td><td>Frame color</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aPlotFrameWeight</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Width fo frame line</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>This is used to specify whether the plot-area should have a rectangle around it and the specifics of that rectangle. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_SETFRAME">Graph::SetFrame()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph </span><span style="color: #007700">= new </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">300</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">'linlin'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Box</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETCLIPPING"><span style="color:#555555;">Graph ::</span><br><b>SetClipping</b>($aFlg)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Enable clipping of graph outside the plotarea</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFlg</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>Enable/disbale clipping</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Enable or disable clipping outside the plot area. If clipping is enabled then only the part of the graph exactly inside the plot area will be visible.
<p>
Clipping may come in handy when you for example set a manual scale and have data points outside the specified range.
<p>
By default clipping is disabled.
<p>
Note 1: Clipping is only supported for graphs at 0 or 90 degrees rotation and will generate an error message if enabled together with any other angle.
<p>
Note 2: The clipping is implemented with a O(1) algorithm in terns of data size.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetClipping</span><span style="color: #007700">();</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETCOLOR"><span style="color:#555555;">Graph ::</span><br><b>SetColor</b>($aColor)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify color for the plotarea (not the margins)</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Color</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify color for the plotarea (not the margins) <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_SETFRAME">Graph::SetFrame()</a><li><a href="Graph.html#_GRAPH_SETMARGINCOLOR">Graph::SetMarginColor()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(?</span><span style="color: #0000BB">wheat</span><span style="color: #007700">?);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETCSIMIMGALT"><span style="color:#555555;">Graph ::</span><br><b>SetCSIMImgAlt</b>($aAlt)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Set the Alt text used for the IMG tag generated for CSIM</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aAlt</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Alt text</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Set the ALt text used for the IMG tag generated for CSIM. Whne calling StrokeCSIM() a HTML page will be returned witha recusrive call to teh same script in an IMG tag. This method allows you to specify the Alt text to be used in the returned HTML page. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_STROKECSIM">Graph::StrokeCSIM()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetCSIMImgAlt</span><span style="color: #007700">(</span><span style="color: #DD0000">'Yearly values'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">StrokeCSIM</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETFRAME"><span style="color:#555555;">Graph ::</span><br><b>SetFrame</b>($aDrawImgFrame, $aImgFrameColor, $aImgFrameWeight)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Set a frame around the entire image</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aDrawImgFrame</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>True=Draw a frame around the entire image</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aImgFrameColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">array(</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">)</span><span style="color: #0000BB"></span>
</span>
</td><td>Frame color</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aImgFrameWeight</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Width of frame</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Sets a frame (rectangle) of the chosen color around the edges of the image.
Note: For implementation reasons the frame must be enabled in order to for a specified gradient background to show up.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_SETMARGINCOLOR">Graph::SetMarginColor()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetFrame</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">,</span><span style="color: #DD0000">'darkblue'</span><span style="color: #007700">,</span><span style="color: #0000BB">2</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETFRAMEBEVEL"><span style="color:#555555;">Graph ::</span><br><b>SetFrameBevel</b>($aDepth, $aBorder, $aBorderColor, $aColor1, $aColor2, $aFlg)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify a abevel frame around the entire graph</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aDepth</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">3</span>
</span>
</td><td>Depth (Height) in pixels for bevel</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBorder</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">false</span>
</span>
</td><td>True=Add 1 pixel border around</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBorderColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'black'</span><span style="color: #0000BB"></span>
</span>
</td><td>Border color</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aColor1</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'white@0.4'</span><span style="color: #0000BB"></span>
</span>
</td><td>Right and bottom shadow</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aColor2</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'darkgray@0.4'</span><span style="color: #0000BB"></span>
</span>
</td><td>Left and top shadow</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFlg</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>True=Show bevel frame</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify a a bevel frame around the entire graph. A Bevel frame will give the entire graph a "3D" uprised feel. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetFrameBevel</span><span style="color: #007700">(</span><span style="color: #0000BB">2</span><span style="color: #007700">,</span><span style="color: #0000BB">true</span><span style="color: #007700">,</span><span style="color: #DD0000">'black'</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETGRIDDEPTH"><span style="color:#555555;">Graph ::</span><br><b>SetGridDepth</b>($aDepth)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Should the grid be in front or back of the plot?</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aDepth</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Grid depth</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify if the grid in the plot should be drawn under or on top of the actual plots.
<p>
Valid values for grid depth are
<ul>
<li>DEPTH_BACK, Under plots
<li>DEPTH_FRONT, On top of plots
</ul>
<p>
The default is to draw the grid lines under the plots. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetGridDepth</span><span style="color: #007700">(</span><span style="color: #0000BB">DEPTH_FRONT</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETICONDEPTH"><span style="color:#555555;">Graph ::</span><br><b>SetIconDepth</b>($aDepth)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Determine if Icons should be under or over the plot</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aDepth</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Depth of icons (see description)</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Determine if Icons should be under or over the plot. The argument is one of
<ul>
<li> DEPTH_BACK
<li> DEPTH_FRONT
</ul>
By default the icons are drawn under the plots <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">// Put the icons in front of the plot<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetIconDepth</span><span style="color: #007700">(</span><span style="color: #0000BB">DEPTH_FRONT</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETIMGFORMAT"><span style="color:#555555;">Graph ::</span><br><b>SetImgFormat</b>($aFormat, $aQuality)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Set Image format and optional quality</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFormat</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Format (see description)</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aQuality</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">75</span>
</span>
</td><td>Quality parameter for JPEG</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify what image format the generated image should use. By default the library will try to create PNG images and if the PNG libraries are not available then it will try to use foirst JPEG and finally GIF encoding.
<p>
The image format is specified as a string that can be one of
<ul>
<li>"PNG", Looseless format with good quality/compression ratio for line graphs
<li> "JPEG", JPEG format
<li> "GIF", GIF Format
</ul>
The PNG format gives in general best compression for ordinary data plots and is also a looseless format.
<p>
If the graph has complicated background images or 100s of colors then there is a good chance that JPEG will give better compression on the expense of image quality.
<p>
The quality parameter is a value between (0,100) inclusively. = gives best compression but worst quality and 100 give the best quality. Suitable ranges is 60-90.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">// Set JPEG format with 60% quality<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetImgFormat</span><span style="color: #007700">(</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">,</span><span style="color: #0000BB">60</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETMARGIN"><span style="color:#555555;">Graph ::</span><br><b>SetMargin</b>($lm, $rm, $tm, $bm)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify side margins for graph</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$lm</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Left margin (in pixels)</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$rm</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Right margin (in pixels)</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$tm</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Top margin (in pixels)</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$bm</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Bottom margin (in pixels)</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify the margin around the actual plot area. This is actually just a shortcut for the Image::SetMargin()
<p>
Note: If you want to set the margin for a 90 degrees rotated graph please consider using Graph::Set90AndMargin() instead since this will automatically adjust for the rotated image and the swapped meaning of width and height.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Image.html#_IMAGE_SETMARGIN">Image::SetMargin()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetMargin</span><span style="color: #007700">(</span><span style="color: #0000BB">40</span><span style="color: #007700">,</span><span style="color: #0000BB">20</span><span style="color: #007700">,</span><span style="color: #0000BB">60</span><span style="color: #007700">,</span><span style="color: #0000BB">20</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETMARGINCOLOR"><span style="color:#555555;">Graph ::</span><br><b>SetMarginColor</b>($aColor)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify color for the margins (all areas outside the plotarea)</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Color</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specifies the color of the area between the plot area and the edge of the image. <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_SETCOLOR">Graph::SetColor()</a><li><a href="Graph.html#_GRAPH_SETFRAME">Graph::SetFrame()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetMarginColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'silver'</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETSCALE"><span style="color:#555555;">Graph ::</span><br><b>SetScale</b>($aAxisType, $aYMin, $aYMax, $aXMin, $aXMax)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify scale to use for X and Y axis</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aAxisType</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Type of axis</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aYMin</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Y-min</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aYMax</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Y-max</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aXMin</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>X-min</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aXMax</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>X-max</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specifies what kind of scales should be used in the graph. The following combinations are allowed
<ul>
<li> Linear scale. Both X and Y axis
<li>Logarithmic scale. Both X and Y axis
<li>Text scale. Only on X axis
<li>Integer scale. X and Y axis
</ul>
Any combination of these may be used. Linear and logarithmic scales are pretty straightforward. The text scale might deserve some explanation. The easiest way to think of the text scale is as a linear scale consisting of only natural numbers, i.e. 0,1,2,3,4,? . This scale is used when you just have a number of Y-values you want to plot in a consecutive order and don?t care about the X-values. It is also used when you need to have text labesl you specify (via $graph->xaxis->SetTickLabels($labels) ).
<p>
To specify which combination of X and Y scales you want to use the $axtype parameter is specified. In this parameter you specify, by a text string, the type of scale you want to use for both X and Y scale.
<p>
Possible values for each axis are:<br>
X: 'lin', 'text', 'log', 'int'<br>
Y: 'lin', 'log', 'int'<br>
<p>
Example of possible combination:<br>
<ul>
<li>SetScale('textint');
<li>SetScale('loglog');
<li>SetScale('linlog');
</ul>
It is normally recommended to use the auto-scaling feature since for most practical purposes it is good enough. However on rare occasions you might want to specify the limits yourself. This is then done by the rest of the parameters to the method.
<p>
Note: If you want to use a logarithmic scale you must make sure that the ?jpgraph_log.php? is included.
<p>
<b>Note1:</b>
Note that if you manually specify the scale you can also specify the tick distance with a call to Ticks::Set(). For example $graph->yaxis->scale->ticks->Set(10,5) If yiou don't ste it manually a suitable tick distance will be automatically choosen.
<b>Note2:</b>
If you want to keep the autoscaling for Y-axis but specify the X-axis then just call the method with both min and max set to 0 (e.g. SetScale('linlin',0,0,0,50); )
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">//----------------------<br />// EXAMPLE1: Using autoscaling<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">'textlin'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//----------------------<br />// EXAMPLE2: Using manual scale for Y-scale and only major ticks<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">'linlin'</span><span style="color: #007700">,</span><span style="color: #0000BB">5</span><span style="color: #007700">,</span><span style="color: #0000BB">75</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">yaxis</span><span style="color: #007700">-></span><span style="color: #0000BB">scale</span><span style="color: #007700">-></span><span style="color: #0000BB">ticks</span><span style="color: #007700">-></span><span style="color: #0000BB">Set</span><span style="color: #007700">(</span><span style="color: #0000BB">10</span><span style="color: #007700">); </span><span style="color: #FF8000">// Set major and minor tick to 10<br /><br />//----------------------<br />// EXAMPLE3: Using manual scale for Y-scale <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">'linlin'</span><span style="color: #007700">,</span><span style="color: #0000BB">5</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">// Set major tick dist to 40 and minor to 20 <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">yaxis</span><span style="color: #007700">-></span><span style="color: #0000BB">scale</span><span style="color: #007700">-></span><span style="color: #0000BB">ticks</span><span style="color: #007700">-></span><span style="color: #0000BB">Set</span><span style="color: #007700">(</span><span style="color: #0000BB">40</span><span style="color: #007700">,</span><span style="color: #0000BB">20</span><span style="color: #007700">); <br /><br /></span><span style="color: #FF8000">//----------------------<br />// EXAMPLE4: Using manual scale for both X and Y-scale <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">'linlin'</span><span style="color: #007700">,</span><span style="color: #0000BB">5</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">// Set major tick dist to 40 and minor to 20 <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">yaxis</span><span style="color: #007700">-></span><span style="color: #0000BB">scale</span><span style="color: #007700">-></span><span style="color: #0000BB">ticks</span><span style="color: #007700">-></span><span style="color: #0000BB">Set</span><span style="color: #007700">(</span><span style="color: #0000BB">40</span><span style="color: #007700">,</span><span style="color: #0000BB">20</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">// Set major and minor tick dist to 20 <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">xaxis</span><span style="color: #007700">-></span><span style="color: #0000BB">scale</span><span style="color: #007700">-></span><span style="color: #0000BB">ticks</span><span style="color: #007700">-></span><span style="color: #0000BB">Set</span><span style="color: #007700">(</span><span style="color: #0000BB">20</span><span style="color: #007700">); <br /><br /></span><span style="color: #FF8000">// Keeping the Autoscaling for Y-axis but fixing the X<br />// scale to an integer scale between [0,50]<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">'intlin'</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">50</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETSHADOW"><span style="color:#555555;">Graph ::</span><br><b>SetShadow</b>($aShowShadow, $aShadowWidth, $aShadowColor)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Add a drop shadow to the image</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aShowShadow</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>True=add a drop shadow</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aShadowWidth</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">5</span>
</span>
</td><td>Width (in pixels of shadow)</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aShadowColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">array(</span><span style="color: #0000BB">102</span><span style="color: #007700">,</span><span style="color: #0000BB">102</span><span style="color: #007700">,</span><span style="color: #0000BB">102</span><span style="color: #007700">)</span><span style="color: #0000BB"></span>
</span>
</td><td>Shadow color</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Sets a frame with a drop down shadow around the entire image <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_SETFRAME">Graph::SetFrame()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetShadow</span><span style="color: #007700">();</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETTEXTSCALEABSCENTEROFF"><span style="color:#555555;">Graph ::</span><br><b>SetTextScaleAbsCenterOff</b>($aOff)</a></div>
<span style='font-family:arial;font-size:95%;'><i>// Text width of bar to be centered in absolute pixels</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aOff</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETTICKDENSITY"><span style="color:#555555;">Graph ::</span><br><b>SetTickDensity</b>($aYDensity, $aXDensity)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify how dense the ticks should be drawn</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aYDensity</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">TICKD_NORMAL</span>
</span>
</td><td>Y-density</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aXDensity</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">TICKD_NORMAL</span>
</span>
</td><td>X-density</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>This method is used to hint how many ticks the auto-scaling should try to fit on each of the axis.
<p>
The following DEFINES may be used to hint to the auto-scaling how many ticks should be allocated
<ul>
<li>TICKD_DENSE, Small distance between ticks
<li>TICKD_NORMAL, Default value
<li>TICKD_SPARSE, Longer distance between ticks
<li>TICKD_VERYSPARSE, Very few ticks
</ul> <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetTickDensity</span><span style="color: #007700">(</span><span style="color: #0000BB">TICKD_DENSE</span><span style="color: #007700">); </span><span style="color: #FF8000">// Many Y-ticks</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETTITLEBACKGROUND"><span style="color:#555555;">Graph ::</span><br><b>SetTitleBackground</b>($aBackColor, $aStyle, $aFrameStyle, $aFrameColor, $aFrameWeight, $aBevelHeight, $aEnable)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify background style for graph titles</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBackColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'gray'</span><span style="color: #0000BB"></span>
</span>
</td><td>Background color</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aStyle</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">TITLEBKG_STYLE1</span>
</span>
</td><td>Background size style, see description</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFrameStyle</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">TITLEBKG_FRAME_NONE</span>
</span>
</td><td>Frame style, see description</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFrameColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'black'</span><span style="color: #0000BB"></span>
</span>
</td><td>Frame color</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aFrameWeight</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Frame thickness (weight)</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBevelHeight</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">3</span>
</span>
</td><td>Bevel height used for frame style bevel</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aEnable</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>Enable/disable background</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify background style for graph titles, i.e. the background style for Graph::title, Graph::subtitle, Graph::subsubtitle. The actual background style is specified with the two arguments $aStyle and $aFrameStyle.
<p>
The first argument $aStyle determines the size the background should cover. The two possibilities are
<ul>
<li>TITLEBKG_STYLE1, FIll the background inside the graph frame
<li>TITLEBKG_STYLE2, Also covers the graph frame
<li>TITLEBKG_STYLE3, Used together with the Bevel frame. WIll put the title beackground under the graph bevel.
</ul>
The second style parameter specifies what type of frame should be drawn. The weight of the frame is adjustable by specifying the $aFrameweight argument. The possible options for frame styles are:
<ul>
<li> TITLEBKG_FRAME_NONE, No frame
<li> TITLEBKG_FRAME_FULL, Full frame around the background
<li> TITLEBKG_FRAME_BOTTOM, Just a line at the bottom
<li> TITLEBKG_FRAME_BEVEL, Draw a Bevel 3D effect (looks like a raised square button). The height of the bevel can be adjusted with the $aBevelHeight argument.
</ul>
You can further adjust the style of the background fill by the SetTitleBackgroundFillStyle() method.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Image.html#_IMAGE_BEVEL">Image::Bevel()</a><li><a href="Graph.html#_GRAPH_SETTITLEBACKGROUNDFILLSTYLE">Graph::SetTitleBackgroundFillStyle()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetTitleBackground</span><span style="color: #007700">(</span><span style="color: #DD0000">'wheat2'</span><span style="color: #007700">,</span><span style="color: #0000BB">TITLEBKG_STYLE1</span><span style="color: #007700">,</span><span style="color: #0000BB">TITLEBKG_FRAME_BOTTOM</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETTITLEBACKGROUNDFILLSTYLE"><span style="color:#555555;">Graph ::</span><br><b>SetTitleBackgroundFillStyle</b>($aStyle, $aColor1, $aColor2)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Adjust the title background fill style</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aStyle</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Fill style (see description)</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aColor1</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'black'</span><span style="color: #0000BB"></span>
</span>
</td><td>Color 1</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aColor2</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'white'</span><span style="color: #0000BB"></span>
</span>
</td><td>Color 2</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>The background for the graph titles as set by SetTitleBackground() can be further adjusted with this method. The style can be sepcified as one of
<ul>
<li> TITLEBKG_FILLSTYLE_HSTRIPED, Alternating horizontal lines of color 1 and color 2
<li> TITLEBKG_FILLSTYLE_VSTRIPED, Alternating vertical lines of color 1 and color 2
<li> TITLEBKG_FILLSTYLE_SOLID, A solid fill color (default)
</ul>
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetTitleBackgroundFillStyle</span><span style="color: #007700">(</span><span style="color: #0000BB">TITLEBKG_FILLSTYLE_HSTRIPED</span><span style="color: #007700">,</span><span style="color: #DD0000">'darkgreen'</span><span style="color: #007700">,</span><span style="color: #DD0000">'black'</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETUSERFONT"><span style="color:#555555;">Graph ::</span><br><b>SetUserFont</b>($aNormal, $aBold, $aItalic, $aBoldIt)</a></div>
<span style='font-family:arial;font-size:95%;'><i></i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aNormal</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBold</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aItalic</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBoldIt</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETUSERFONT1"><span style="color:#555555;">Graph ::</span><br><b>SetUserFont1</b>($aNormal, $aBold, $aItalic, $aBoldIt)</a></div>
<span style='font-family:arial;font-size:95%;'><i></i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aNormal</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBold</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aItalic</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBoldIt</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETUSERFONT2"><span style="color:#555555;">Graph ::</span><br><b>SetUserFont2</b>($aNormal, $aBold, $aItalic, $aBoldIt)</a></div>
<span style='font-family:arial;font-size:95%;'><i></i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aNormal</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBold</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aItalic</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBoldIt</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETUSERFONT3"><span style="color:#555555;">Graph ::</span><br><b>SetUserFont3</b>($aNormal, $aBold, $aItalic, $aBoldIt)</a></div>
<span style='font-family:arial;font-size:95%;'><i></i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aNormal</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBold</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aItalic</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBoldIt</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETY2ORDERBACK"><span style="color:#555555;">Graph ::</span><br><b>SetY2OrderBack</b>($aBack)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify that plots on the Y2 axis should be under Y axis plots</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBack</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>TRUE=under Y axis, FALSE=above</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Set the depth for Y2 plots as compare to plots added to the Y axis <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetY2OrderBack</span><span style="color: #007700">();</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETY2SCALE"><span style="color:#555555;">Graph ::</span><br><b>SetY2Scale</b>($aAxisType, $aY2Min, $aY2Max)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify secondary Y scale</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aAxisType</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'lin'</span><span style="color: #0000BB"></span>
</span>
</td><td>Type of scale</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aY2Min</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Y2Min value</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aY2Max</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Y2Max value</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>The graph allows two different Y-scales to be used and you can choose which one you want to use for a specific plot by the way you are adding the plot to the graph, either by Add() or by AddY2() method.
<p>
This method works in the exact same way for the Y2 axis as the SetScale() method previously described.
<p>
Allowed values for the $axtype are
<ul>
<li>?lin?, Linear scale
<li>?log?, Logarithmic scale
<li>?int?, Integer scale
</ul>
<b>Note:</b> If you want to use a logarithmic scale you must make sure that the ?jpgraph_log.php? is included.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_SETSCALE">Graph::SetScale()</a><li><a href="Graph.html#_GRAPH_ADDY2">Graph::AddY2()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">// Left Y scale linear and right Y-scale logarithmic<br /></span><span style="color: #0000BB">$graph </span><span style="color: #007700">= new </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">300</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(?</span><span style="color: #0000BB">textlin</span><span style="color: #007700">?);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetY2Scale</span><span style="color: #007700">(?</span><span style="color: #0000BB">log</span><span style="color: #007700">?);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETYDELTADIST"><span style="color:#555555;">Graph ::</span><br><b>SetYDeltaDist</b>($aDist)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Set the delta position (in pixels) between the multiple Y-axis</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aDist</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Distance in pixels</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Set the delta position (in pixels) between the multiple Y-axis <br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_SETYSCALE"><span style="color:#555555;">Graph ::</span><br><b>SetYScale</b>($aN, $aAxisType, $aYMin, $aYMax)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify scale for additional Y-axis</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aN</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Index of axis</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aAxisType</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">"lin"</span><span style="color: #0000BB"></span>
</span>
</td><td>Scale type of axis</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aYMin</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Optional min scale value</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aYMax</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Optional max scale value</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify scale for additional Y-axis <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700"><?</span><span style="color: #0000BB">php<br /></span><span style="color: #007700">include (</span><span style="color: #DD0000">"../jpgraph.php"</span><span style="color: #007700">);<br />include (</span><span style="color: #DD0000">"../jpgraph_line.php"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$datay </span><span style="color: #007700">= array(</span><span style="color: #0000BB">5</span><span style="color: #007700">,</span><span style="color: #0000BB">3</span><span style="color: #007700">,</span><span style="color: #0000BB">7</span><span style="color: #007700">,</span><span style="color: #0000BB">2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$datay2 </span><span style="color: #007700">= array(</span><span style="color: #0000BB">88</span><span style="color: #007700">,</span><span style="color: #0000BB">10</span><span style="color: #007700">,</span><span style="color: #0000BB">55</span><span style="color: #007700">,</span><span style="color: #0000BB">42</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$datay3 </span><span style="color: #007700">= array(</span><span style="color: #0000BB">255</span><span style="color: #007700">,</span><span style="color: #0000BB">35</span><span style="color: #007700">,</span><span style="color: #0000BB">745</span><span style="color: #007700">,</span><span style="color: #0000BB">244</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$datay4 </span><span style="color: #007700">= array(</span><span style="color: #0000BB">130</span><span style="color: #007700">,</span><span style="color: #0000BB">97</span><span style="color: #007700">,</span><span style="color: #0000BB">68</span><span style="color: #007700">,</span><span style="color: #0000BB">119</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Setup the graph<br /></span><span style="color: #0000BB">$graph </span><span style="color: #007700">= new </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">600</span><span style="color: #007700">,</span><span style="color: #0000BB">250</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetMargin</span><span style="color: #007700">(</span><span style="color: #0000BB">30</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">,</span><span style="color: #0000BB">20</span><span style="color: #007700">,</span><span style="color: #0000BB">20</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetMarginColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'white'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'lightgray'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">"intlin"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetYScale</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #DD0000">"lin"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetYScale</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">,</span><span style="color: #DD0000">"lin"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetYScale</span><span style="color: #007700">(</span><span style="color: #0000BB">2</span><span style="color: #007700">,</span><span style="color: #DD0000">"lin"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$p1 </span><span style="color: #007700">= new </span><span style="color: #0000BB">LinePlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$p1</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'blue'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Add</span><span style="color: #007700">(</span><span style="color: #0000BB">$p1</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$p2 </span><span style="color: #007700">= new </span><span style="color: #0000BB">LinePlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$p2</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'darkred'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddY</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">$p2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">ynaxis</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'darkred'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$p3 </span><span style="color: #007700">= new </span><span style="color: #0000BB">LinePlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$p3</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'red'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddY</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">,</span><span style="color: #0000BB">$p3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">ynaxis</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'red'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$p4 </span><span style="color: #007700">= new </span><span style="color: #0000BB">LinePlot</span><span style="color: #007700">(</span><span style="color: #0000BB">$datay4</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$p4</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'blue'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddY</span><span style="color: #007700">(</span><span style="color: #0000BB">2</span><span style="color: #007700">,</span><span style="color: #0000BB">$p4</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">ynaxis</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'blue'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Output line<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Stroke</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB"><br /></span></span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_STROKE"><span style="color:#555555;">Graph ::</span><br><b>Stroke</b>($aStrokeFileName)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Stroke graph to browser or file</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aStrokeFileName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>File name* (or special handle, see below)</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Should be the final method called in the script that generates a graph. This will generate the image and send it back to the browser.
<p>
If $aStrokeFileName != "" the image will be written to this file and NOT streamed back to the browser
<p>
If the file name is specified with the define __IMG_HANDLER (Note: Thre are 2 '_' in the beginning) then no image will be streamed to file or browser. Instead the Stroke() method will simply return the image handle used by the GD library. This can come in handy of you like to post manipulate the image or use the raw GD image in other context. Such as in creating dynamic PDF documents.
<p>
Note: If you want to use the image in a PDF file you can't take the handle directly since this is a GD handle. To use it in PDF you must first create an PDF image by calling pdf_open_memory_image() to get a proper PDF image handle. See example below.
<p>
You may also specify the file name as "auto" in which case the filename will be created from the script name but with the extension changed to reflect the choosen image format.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">// Example 1 : (Normal case) Stream back to browser<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Stroke</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">// Example 2 : Stream to the file with absolute file path<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Stroke</span><span style="color: #007700">(</span><span style="color: #0000BB">$fileName</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Example 3<br />// Get the image handle. NOTE: No image will be <br />// streamed to the browser in this case.<br /></span><span style="color: #0000BB">$ih </span><span style="color: #007700">= </span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Stroke</span><span style="color: #007700">(</span><span style="color: #0000BB">__IMG_HANDLER</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// PDF example<br />//....<br /></span><span style="color: #0000BB">$im </span><span style="color: #007700">= </span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">Stroke</span><span style="color: #007700">(</span><span style="color: #0000BB">_IMG_HANDLER</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$pdf </span><span style="color: #007700">= </span><span style="color: #0000BB">pdf_new</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">pdf_open_file</span><span style="color: #007700">(</span><span style="color: #0000BB">$pdf</span><span style="color: #007700">, </span><span style="color: #DD0000">""</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$pimg </span><span style="color: #007700">= </span><span style="color: #0000BB">pdf_open_memory_image</span><span style="color: #007700">(</span><span style="color: #0000BB">$pdf</span><span style="color: #007700">, </span><span style="color: #0000BB">$im</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">pdf_begin_page</span><span style="color: #007700">(</span><span style="color: #0000BB">$pdf</span><span style="color: #007700">, </span><span style="color: #0000BB">595</span><span style="color: #007700">, </span><span style="color: #0000BB">842</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">pdf_add_outline</span><span style="color: #007700">(</span><span style="color: #0000BB">$pdf</span><span style="color: #007700">, </span><span style="color: #DD0000">"Page 1"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">pdf_place_image</span><span style="color: #007700">(</span><span style="color: #0000BB">$pdf</span><span style="color: #007700">, </span><span style="color: #0000BB">$pimg</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">500</span><span style="color: #007700">, </span><span style="color: #0000BB">1</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">pdf_close_image</span><span style="color: #007700">(</span><span style="color: #0000BB">$pdf</span><span style="color: #007700">, </span><span style="color: #0000BB">$pimg</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">pdf_end_page</span><span style="color: #007700">(</span><span style="color: #0000BB">$pdf</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">pdf_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$pdf</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$buf </span><span style="color: #007700">= </span><span style="color: #0000BB">pdf_get_buffer</span><span style="color: #007700">(</span><span style="color: #0000BB">$pdf</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$len </span><span style="color: #007700">= </span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">$buf</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-type: application/pdf"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-Length: $len"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-Disposition: inline; filename=jpimage.pdf"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$buf</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">pdf_delete</span><span style="color: #007700">(</span><span style="color: #0000BB">$pdf</span><span style="color: #007700">);<br /><br /><br /><br /><br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_STROKECSIM"><span style="color:#555555;">Graph ::</span><br><b>StrokeCSIM</b>($aScriptName, $aCSIMName, $aBorder)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Stroke an image with a CSIM</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aScriptName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'auto'</span><span style="color: #0000BB"></span>
</span>
</td><td>Name of the image generating script</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aCSIMName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>Image map name</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aBorder</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">0</span>
</span>
</td><td>Should the image be bordered?</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>To generate an CSIM you must use this method at the end of your script instead of the normal Graph::Stroke() method. This method does not send back an image to the browser but rather a HTML page which contains an image map and a "recursive call" back to the image script. See the full JpGraph manual for a detailed explanation on how this works.
<p>
Please note that it is abolutely imperative that you specify the image generating scripts name as the first argument.
<p>
Why that? Because it is impossible for JpGraph to find out the name of the script it is executed from in the case where it is included as oart of a "standard" HTML/PHP page. Using the PHP_SELF will only return the master document and not the actual script name.
<p>
If you use several image map images on the same HTML page you must also specify unique names of each of the image maps as the second argument for this function.
<p>
To specify targets for the image maps you must call the individual plots Pot::SetCSIMTargets()
<p>
Tip: You can easily specify the script name by using the construction
basename(__FILE__) as the first argument <br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Plot.html#_PLOT_SETCSIMTARGETS">Plot::SetCSIMTargets()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">...<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">StrokeCSIM</span><span style="color: #007700">(</span><span style="color: #0000BB">basename</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_STROKECSIMIMAGE"><span style="color:#555555;">Graph ::</span><br><b>StrokeCSIMImage</b>()</a></div>
<span style='font-family:arial;font-size:95%;'><i>// Construct wrapper HTML and write to file and send it back to browser// In the src URL we must replace the '?' with its encoding to prevent the arguments// to be converted to real arguments.</i></span><p>
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_STROKEFRAMEBACKGROUND"><span style="color:#555555;">Graph ::</span><br><b>StrokeFrameBackground</b>()</a></div>
<span style='font-family:arial;font-size:95%;'><i>Stroke the frames background and border</i></span><p>
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Semi Internal routine. Exclusively used together with canvas graphs where object are added directly to the canvas and we therefore must make sure that the background is stroked first.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">e</span>
</span>
</b></div><br>
<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH_STROKESTORE"><span style="color:#555555;">Graph ::</span><br><b>StrokeStore</b>($aStrokeFileName)</a></div>
<span style='font-family:arial;font-size:95%;'><i>// DO Nothing. It gets too messy to do this properly for 90 deg...</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aStrokeFileName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_GRAPH___CONSTRUCT"><span style="color:#555555;">Graph ::</span><br><b>__construct</b>($aWidth, $aHeight, $aCachedName, $aTimeOut, $aInline)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Creates a new graph.</i></span><p>
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aWidth</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">300</span>
</span>
</td><td>Width</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aHeight</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">200</span>
</span>
</td><td>Height</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aCachedName</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>Cache file name</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aTimeOut</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">0</span>
</span>
</td><td>Timeout value for cache</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aInline</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>True=Stream the image back to the browser</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Creates a new graph. This is often the first call made to set-up a new graph.
<br>
If the cache name is specified (via the $aCachedname) argument then this method will first try to locate the named file in the cache directory (as specified by the DEFINE in jpgraph.php) rather then generating the graph on the fly. If the file is not there or if it is older then the specified timeout value ($aTimeOut) the graph will be generated and saved as the specified file.
<p>
If the cache name is specifed as 'auto' then the cache name will be based on the basename of the script with an extension indicating the image format used, i.e. JPG, GIF or PNG.
<p>
If the specified file is found in the cache directory then it will be streamed back to the browser directly.
<p>
If no cache name is specified then the graph will always be generated and the cache bypassed. The same is true if the DEFINE 'USE_CACHE' or 'READ_CACHE' is set to false.
<p>
Before any other operation is performed on the graph a call to SetScale() should be made to finish the initialisation of the graph.
<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Graph.html#_GRAPH_STROKE">Graph::Stroke()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">// Example 1. use cache and automtic create the cache name<br /></span><span style="color: #0000BB">$graph </span><span style="color: #007700">= new </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">400</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">,</span><span style="color: #DD0000">"auto"</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">img</span><span style="color: #007700">-></span><span style="color: #0000BB">SetMargin</span><span style="color: #007700">(</span><span style="color: #0000BB">60</span><span style="color: #007700">,</span><span style="color: #0000BB">20</span><span style="color: #007700">,</span><span style="color: #0000BB">30</span><span style="color: #007700">,</span><span style="color: #0000BB">50</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">"textlin"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetMarginColor</span><span style="color: #007700">(</span><span style="color: #DD0000">"silver"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetShadow</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">// Example 2 . Don't use the cache<br /></span><span style="color: #0000BB">$graph </span><span style="color: #007700">= new </span><span style="color: #0000BB">Graph</span><span style="color: #007700">(</span><span style="color: #0000BB">400</span><span style="color: #007700">,</span><span style="color: #0000BB">200</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScale</span><span style="color: #007700">(</span><span style="color: #DD0000">"textint"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p> <hr> <p></html>