2132 lines
190 KiB
HTML
2132 lines
190 KiB
HTML
<!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> |