Blame | Last modification | View Log | RSS feed
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>Chapter 9. PHPlot Class Internal Functions</title><link rel="stylesheet" type="text/css" href="phplotdoc.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="PHPlot Reference Manual" /><link rel="up" href="part3.html" title="Part III. Developer's Guide to PHPlot" /><link rel="prev" href="dev-legend.html" title="Chapter 8. PHPlot Legend Layout" /><link rel="next" href="dev-vars.html" title="Chapter 10. PHPlot Class Member Variables" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 9. PHPlot Class Internal Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="dev-legend.html">Prev</a> </td><th width="60%" align="center">Part III. Developer's Guide to PHPlot</th><td width="20%" align="right"> <a accesskey="n" href="dev-vars.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="dev-internal"></a>Chapter 9. PHPlot Class Internal Functions</h2></div></div></div><div class="abstract"><p class="title"><strong></strong></p><p>This chapter documents PHPlot internal functions. These functions areintended to be used only by PHPlot itself.</p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Starting with PHPlot-5.1.0, most of the internal functions are declared as<code class="literal">protected</code>, which limits their visibility to other memberfunctions and inherited or parent classes. Some internal functions arestill <code class="literal">public</code>, usually because they are needed fortesting PHPlot. However, all functions documented in this chapter should betreated as private, for use only by PHPlot. If you feel you have a need touse one of these functions from outside PHPlot (or an inherited class),please report this via the available PHPlot support mechanisms.</p></div><div class="variablelist"><dl class="variablelist"><dt><span class="term"><a id="array_merge_php4"></a>array_merge_php4($array1,$array2)</span></dt><dd><p>This non-member function was removed at PHPlot-5.0.4.</p></dd><dt><span class="term"><a id="array_pad_array"></a>array_pad_array(&$arr, $size, $arr2=NULL)</span></dt><dd><p>This non-member function was removed at PHPlot-5.0.4 and replaced withthe class member function <a class="xref" href="dev-internal.html#pad_array">pad_array</a>.</p></dd><dt><span class="term"><a id="CalcAxisPositions"></a>CalcAxisPositions()</span></dt><dd><p>Calculates the X and Y axis positions in world coordinates. These can besupplied by the user, in which case they are only changed if they areoutside the data range. If axis positions are not supplied by the user,CalcAxisPositions applies defaults as described in<a class="xref" href="SetXAxisPosition.html" title="SetXAxisPosition"><span class="refentrytitle">SetXAxisPosition</span></a> and <a class="xref" href="SetYAxisPosition.html" title="SetYAxisPosition"><span class="refentrytitle">SetYAxisPosition</span></a>.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>.Note: This code was moved out of CalcTranslation at PHPlot-5.0.5.</p></dd><dt><span class="term"><a id="CalcBarWidths"></a>CalcBarWidths($stacked, $verticals)</span></dt><dd><p>Calculates values for <code class="literal">bars</code> and <code class="literal">stackedbars</code>plot types.It calculates the width of the bars and the margins around and between them.An argument was added in PHPlot-5.1.2 to support horizontal plots.Arguments were changed in PHPlot-5.3.0 to explicitly select stacked orgrouped bars, and vertical or horizontal plots.This is called by the bar chart drawing functions<a class="xref" href="dev-internal.html#DrawBars">DrawBars</a>, <a class="xref" href="dev-internal.html#DrawStackedBars">DrawStackedBars</a>,<a class="xref" href="dev-internal.html#DrawHorizBars">DrawHorizBars</a>, and <a class="xref" href="dev-internal.html#DrawHorizStackedBars">DrawHorizStackedBars</a>.(Through PHPlot-5.1.2 this was called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> before abars or stackedbars plot.)</p></dd><dt><span class="term"><a id="CalcGridSettings"></a>CalcGridSettings()</span></dt><dd><p>This function was removed at PHPlot-6.0.0. It applied the defaults to the Xand Y grid flags. PHPlot now uses <a class="xref" href="dev-internal.html#GetGridSetting">GetGridSetting</a> instead.</p></dd><dt><span class="term"><a id="CalcMargins"></a>CalcMargins($maximize)</span></dt><dd><p>Calculates the size of the four margins around the plot area:x_left_margin, x_right_margin, y_top_margin, and y_bot_margin.It does this by trying to determine how much space is needed for titles,labels, and tick marks.Starting with PHPlot-5.0.5, this is only called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>,and it also calculates position offsets for titles and labels. It is calledeven in case of a user-supplied plot area (SetPlotAreaPixels orSetMarginsPixels was used). If the $maximize argument is true, then theplot area does not leave room for X or Y axis, labels, or titles; this isused for pie charts.</p><p>Through PHPlot-5.0.6, all 4 margins are either user-defined or all 4 areautomatically calculated. Starting with PHPlot-5.0.7, the 4 margins can beindependently set or defaulted to automatic. CalcMargins calculates valuesfor all 4 margins, but only saves those that have not been set using either<a class="xref" href="SetMarginsPixels.html" title="SetMarginsPixels"><span class="refentrytitle">SetMarginsPixels</span></a> or <a class="xref" href="SetPlotAreaPixels.html" title="SetPlotAreaPixels"><span class="refentrytitle">SetPlotAreaPixels</span></a>.Note that other than the overall plot title, elements are drawn relative tothe plot area, which is calculated based on the actual margins. If the topmargin is increased, for example, the plot title stays at the top of theimage, but top tick marks and labels move down against the graph.</p></dd><dt><span class="term"><a id="CalcMaxDataLabelSize"></a>CalcMaxDataLabelSize($which = 'x')</span></dt><dd><p>Calculates the size of the biggest X or Y data label.For 'x' it returns the height along the Y axis of the tallest data label.For 'y' it returns the width along the sides of the widest data label.This is used to allocate space for margins.This was added to PHPlot-5.0.5.The argument supporting Y label width was added in PHPlot-5.1.2.Called by <a class="xref" href="dev-internal.html#CalcMargins">CalcMargins</a>.</p></dd><dt><span class="term"><a id="CalcMaxTickLabelSize"></a>CalcMaxTickLabelSize($which)</span></dt><dd><p>Calculates the size of the biggest tick label. The $which argument is 'x'or 'y' to indicate which labels to work with. For 'x', it returns theheight along the Y axis; for 'y' it returns the width along the X axis.This is used to allocate space for margins.This was added to PHPlot-5.0.5.Calls <a class="xref" href="dev-internal.html#CalcTicks">CalcTicks</a> to determine the tick value parameters.Called by <a class="xref" href="dev-internal.html#CalcMargins">CalcMargins</a>.</p></dd><dt><span class="term"><a id="CalcPlotAreaPixels"></a>CalcPlotAreaPixels()</span></dt><dd><p>Calculates the pixel coordinates of the plot area.This was added to PHPlot-5.0.5 by moving the parts of the calculations out ofSetPlotAreaPixels and SetMarginsPixels. Those two functions now simplyrecord their arguments, and make no attempt to calculate any parameters.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>, after <a class="xref" href="dev-internal.html#CalcMargins">CalcMargins</a>is used to calculate margins.</p></dd><dt><span class="term"><a id="CalcPlotAreaWorld"></a>CalcPlotAreaWorld()</span></dt><dd><p>Calculates the world coordinate limits of the plot area.This was added to PHPlot-5.0.5 by moving the calculations out of<a class="xref" href="SetPlotAreaWorld.html" title="SetPlotAreaWorld"><span class="refentrytitle">SetPlotAreaWorld</span></a>.Starting with PHPlot-6.0.0, it just calls <a class="xref" href="dev-internal.html#CalcPlotRange">CalcPlotRange</a>twice, once for X and once for Y.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>, after <a class="xref" href="dev-internal.html#FindDataLimits">FindDataLimits</a>is used to examine the data array values.</p></dd><dt><span class="term"><a id="CalcPlotRange"></a>CalcPlotRange($which)</span></dt><dd><p>Calculates the plot range and tick increment. $which is 'x' or 'y', tocalculate values for the X or Y axis.Specified values (e.g. with <a class="xref" href="SetPlotAreaWorld.html" title="SetPlotAreaWorld"><span class="refentrytitle">SetPlotAreaWorld</span></a>or <a class="xref" href="SetXTickIncrement.html" title="SetXTickIncrement"><span class="refentrytitle">SetXTickIncrement</span></a>) are used if set. Otherwise, valuesare calculated heuristically.Returns an array of 3 calculated values: tick_increment, plot_min, and plot_max.This was added in PHPlot-6.0.0.Calls <a class="xref" href="dev-internal.html#CalcStep">CalcStep</a> if necessary to calculate the tickincrement. (If either the tick increment or number of ticks has been set,then CalcPlotRange uses those instead of calling CalcStep).Called by <a class="xref" href="dev-internal.html#CalcPlotAreaWorld">CalcPlotAreaWorld</a>, once for X and once for Y.</p></dd><dt><span class="term"><a id="CalcRangeInit"></a>CalcRangeInit(&$plot_limit, $implied, $data_limit)</span></dt><dd><p>Calculates the initial values for the plot range ends.$plot_limit is one end (min or max) of a plot range. It is passed as areference because it might be unset. Unset, NULL, or an empty string meansthis end of the range has not been set and needs to be calculated.$implied is true when the data type does not specify the value (forexample, the X value in text-data data type).$data_limit is the actual data limit (min or max) at this end of the range;given no other information this is the initial guess for the plot range limit.Returns an array of 2 elements: the initial value for the plot range limit,and a flag indicating if additional adjustment of that value is to be done.</p><p>This was added in PHPlot-6.0.0.Called by <a class="xref" href="dev-internal.html#CalcPlotRange">CalcPlotRange</a> 4 times, once for each end of the Xand Y ranges.</p></dd><dt><span class="term"><a id="CalcStep"></a>CalcStep($which, $range)</span></dt><dd><p>Calculates an appropriate tick increment.$which is 'x' or 'y', and selects configuration variables for that axis.$range is the plot area range (max - min).Returns the calculated tick increment.</p><p>This function is not called if the user has set a tick increment(<a class="xref" href="SetXTickIncrement.html" title="SetXTickIncrement"><span class="refentrytitle">SetXTickIncrement</span></a>, <a class="xref" href="SetYTickIncrement.html" title="SetYTickIncrement"><span class="refentrytitle">SetYTickIncrement</span></a>)or the number of tick marks(<a class="xref" href="SetNumXTicks.html" title="SetNumXTicks"><span class="refentrytitle">SetNumXTicks</span></a>, <a class="xref" href="SetNumYTicks.html" title="SetNumYTicks"><span class="refentrytitle">SetNumYTicks</span></a>).This function calls either <a class="xref" href="dev-internal.html#CalcStep125">CalcStep125</a>,<a class="xref" href="dev-internal.html#CalcStepBinary">CalcStepBinary</a>, or <a class="xref" href="dev-internal.html#CalcStepDatetime">CalcStepDatetime</a>to calculate an appropriate value, depending on the tick increment mode.This was added in PHPlot-6.0.0.Called by <a class="xref" href="dev-internal.html#CalcPlotRange">CalcPlotRange</a>.</p></dd><dt><span class="term"><a id="CalcStep125"></a>CalcStep125($range, $min_ticks)</span></dt><dd><p>Calculates an appropriate tick increment in 'decimal' mode. This is thedefault mode.$range is the plot area range (max - min).$min_ticks is the minimum number of tick intervals to produce.Returns the calculated tick increment.The algorithm produces the largest tick increment that is a power of 10times 1, 2, or 5, and divides the plot area range $range into no fewer than$min_ticks intervals.This was added in PHPlot-6.0.0.Called by <a class="xref" href="dev-internal.html#CalcStep">CalcStep</a>.</p></dd><dt><span class="term"><a id="CalcStepBinary"></a>CalcStepBinary($range, $min_ticks)</span></dt><dd><p>Calculates an appropriate tick increment in 'binary' (power of 2) mode.$range is the plot area range (max - min).$min_ticks is the minimum number of tick intervals to produce.Returns the calculated tick increment.The algorithm produces the largest tick increment that is a power of 2and divides the plot area range $range into no fewer than $min_ticks intervals.This was added in PHPlot-6.0.0.Called by <a class="xref" href="dev-internal.html#CalcStep">CalcStep</a>.</p></dd><dt><span class="term"><a id="CalcStepDatetime"></a>CalcStepDatetime($range, $min_ticks)</span></dt><dd><p>Calculates an appropriate tick increment in 'date' mode.This is for when the values along the axis represent date/time values.$range is the plot area range (max - min), in seconds.$min_ticks is the minimum number of tick intervals to produce.Returns the calculated tick increment.The function contains a list of acceptable intervals between 1 second and 1week, and returns one of those if possible - the largest value that dividesthe plot area range $range into no fewer than $min_ticks intervals. If therange is too large (would produce too many ticks with an increment of 1week), the function falls back to using <a class="xref" href="dev-internal.html#CalcStep125">CalcStep125</a> withunits of 1 day.This was added in PHPlot-6.0.0.Called by <a class="xref" href="dev-internal.html#CalcStep">CalcStep</a>.</p></dd><dt><span class="term"><a id="CalcTicks"></a>CalcTicks($which)</span></dt><dd><p>Gets the tick parameters. $which is 'x' or 'y'. Returns an array of 3values: start, end, and interval.This was added to PHPlot-5.0.5, although still using the methodof just dividing the interval by 10 if there is no user-supplied intervalor tick count.Starting with PHPlot-5.4.0, it also accounts for a tick anchor value, byshifting the start value as needed.Starting in PHPlot-6.0.0, it no longer calculates the tick increment, butsimply uses the values calculated by <a class="xref" href="dev-internal.html#CalcPlotRange">CalcPlotRange</a>.Called by <a class="xref" href="dev-internal.html#CalcMaxTickLabelSize">CalcMaxTickLabelSize</a>,<a class="xref" href="dev-internal.html#DrawYTicks">DrawYTicks</a>, and <a class="xref" href="dev-internal.html#DrawXTicks">DrawXTicks</a>.</p></dd><dt><span class="term"><a id="CalcTranslation"></a>CalcTranslation()</span></dt><dd><p>Calculates the parameters for transforming world to pixel coordinates.This function calculates the scale (xscale, yscale) and origin(plot_origin_x, plot_origin_y) for X and Y translations, whichare used by the xtr() and ytr() functions.Starting with PHPlot-5.0.5, this is only called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>,as nothing else uses the parameters until the graph is ready to be drawn.</p></dd><dt><span class="term"><a id="CheckDataArray"></a>CheckDataArray()</span></dt><dd><p>Checks that there is a valid data array for the plot, and calculates valuesthat depend on the data type.Called very early by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>.This was added in PHPlot-5.1.3, moving the checking out of DrawGraphand adding the data_columns calculation.</p></dd><dt><span class="term"><a id="CheckDataType"></a>CheckDataType($valid_types)</span></dt><dd><p>Used to validate the data_type for a plot_type. This works like a specializedversion of <a class="xref" href="dev-internal.html#CheckOption">CheckOption</a>. $valid_types contains the validdata type(s) for the current plot_type, separated by a comma and space if morethan one is supported. If the current data_type is in the list, returns TRUE,else produces an error. This was added in PHPlot-5.1.2 to unify the waythe plot drawing functions check the data type.</p></dd><dt><span class="term"><a id="CheckDataValueLabels"></a>CheckDataValueLabels($label_control, &$dvl)</span></dt><dd><p>Checks to see if data value labels should be drawn, based on $label_control(which is either <code class="literal">$this->y_data_label_pos</code> for vertical plots,or <code class="literal">$this->x_data_label_pos</code> for horizontal plots).Returns FALSE if the labels are off, else returns TRUE and sets 4 variablesin the $dvl array. This array is used by <a class="xref" href="dev-internal.html#DrawDataValueLabel">DrawDataValueLabel</a>to position the label. The array contains these keys: x_offset, y_offset :device coordinate (pixel) offsets for the label; h_align, v_align :text alignment.Called by plot type drawing functions such as <a class="xref" href="dev-internal.html#DrawDots">DrawDots</a>which do data value labels, other than bars and stackedbars.This was added in PHPlot-5.3.0.Through PHPlot-5.7.0, four separate reference arguments were used for thereturn values, instead of an array.</p></dd><dt><span class="term"><a id="CheckLabels"></a>CheckLabels()</span></dt><dd><p>Fixes up the data and tick label position and angle.This applies defaults to data label and tick label positions but avoidshaving them overlap unless the user deliberately positioned them that way.Also sets the default angle for X data labels.This is for compatibility with PHPlot-5.0.7 and earlier, when there was onlyone control for both types of labels.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> before calculating margins with<a class="xref" href="dev-internal.html#CalcMargins">CalcMargins</a>.This was added in PHPlot-5.1.0.Before PHPlot-6.0.0, it also applied tick label format settings asdefaults for data label formatting. Starting with PHPlot-6.0.0, thisis now handled in <a class="xref" href="dev-internal.html#FormatLabel">FormatLabel</a> instead.</p></dd><dt><span class="term"><a id="CheckLabelsAllEmpty"></a>CheckLabelsAllEmpty()</span></dt><dd><p>Returns TRUE if all of the labels in the data array are empty strings.This is used by <a class="xref" href="dev-internal.html#CheckLabels">CheckLabels</a> to determine whether tick oraxis data labels should default on if both are left off.This was added in PHPlot-5.1.2.</p></dd><dt><span class="term"><a id="CheckOption"></a>CheckOption($which_opt, $which_acc, $which_func)</span></dt><dd><p>Checks the validity of an option passed to a PHPlot member function.$which_opt is the string to check, and $which_acc is a string of acceptablechoices (with a comma and then a space between choices).If the string to check is not found in the string of acceptable choices, afatal error will be reported using <a class="xref" href="dev-internal.html#PrintError">PrintError</a>.The error message will include $which_func which shouldbe the name of the calling function (using the PHP __FUNCTION__ magic constant).Note that this is used to catch programming errors, not run-time or user errors.If the string to check is acceptable, it is returned down-cased and trimmedof leading and trailing spaces.Note: At PHPlot-5.0.5, this function was changed to require exactly ', '(comma space) between acceptable choices, and reject empty strings for$which_opt and disallow partial matches.</p></dd><dt><span class="term"><a id="CheckOptionArray"></a>CheckOptionArray($opt, $acc, $func)</span></dt><dd><p>Checks the validity of an option argument passed to a PHPlot member functionthat can accept its argument as either a string or an array of strings.$opt is the string or array to check, and $acc is a string of acceptablechoices (with a comma and then a space between choices).If the $opt argument is supplied as a string, it is first converted to anarray with one element. Then the elements of the array are each checkedfor validity. If any element of the array of strings to check is notfound in the string of acceptable choices, a fatal error will be reportedusing <a class="xref" href="dev-internal.html#PrintError">PrintError</a>. The error message will include $funcwhich should be the name of the calling function (using the PHP__FUNCTION__ magic constant). Note that this is used to catch programmingerrors, not run-time or user errors. If all of the array elements to checkare acceptable, the array is returned with each element down-cased andtrimmed of leading and trailing spaces. Note that an array is alwaysreturned, even if the opt argument is a string.This was added in PHPlot-5.1.2.</p></dd><dt><span class="term"><a id="CheckPieLabels"></a>CheckPieLabels()</span></dt><dd><p>Sets up the default pie chart label type and format. The default is percentagelabels formatted as 'data' (fixed-point). The default cannot be staticallydefined, for compatibility with previous releases which used the Y labelprecision (if set), else 1 digit if <a class="xref" href="SetPrecisionY.html" title="SetPrecisionY"><span class="refentrytitle">SetPrecisionY</span></a>was never called.Called by <a class="xref" href="dev-internal.html#DrawPieChart">DrawPieChart</a>.This was added in PHPlot-5.6.0.</p></dd><dt><span class="term"><a id="CheckPlotRange"></a>CheckPlotRange($which, &$plot_min, &$plot_max, $adjust_min, $adjust_max)</span></dt><dd><p>Ensures that the X or Y plot range is positive. This is necessary because theplot range and tick increment calculations, as well as the overall plottingfunctions, cannot handle zero or negative ranges.A bad range can happen as a result of 'flat' or missing data (all Y valuesthe same, for example), or if <a class="xref" href="SetPlotAreaWorld.html" title="SetPlotAreaWorld"><span class="refentrytitle">SetPlotAreaWorld</span></a> is used toset one end of the data range, and the actual data is on the wrong side ofthat limit. (<code class="function">SetPlotAreaWorld</code> itself defends againstsetting both ends of a range such that min >= max).PHPlot will never adjust user-set plot limits, but it will adjust its owncalculated limits to force a positive range (even if the resulting plot maynot be useful).</p><p>$which is 'x' or 'y' (this is only used for error reporting).$plot_min and $plot_max are the range limits. These are passed by referenceand may be adjusted by the function.$adjust_min and $adjust_max are flags indicating if the corresponding$plot_min and $plot_max values were user-specified (False) or calculated (True).A flag value of True means <code class="function">CheckPlotRange</code> may adjustthe corresponding plot range value to prevent a non-positive range.Called by <a class="xref" href="dev-internal.html#CalcPlotRange">CalcPlotRange</a>.This was added in PHPlot-6.0.0.</p></dd><dt><span class="term"><a id="CheckPointParams"></a>CheckPointParams()</span></dt><dd><p>Adjusts the point_shapes and point_sizes arrays so they have the same size,and stores the size in a class variable. This handles processing deferredfrom <a class="xref" href="SetPointShapes.html" title="SetPointShapes"><span class="refentrytitle">SetPointShapes</span></a> and <a class="xref" href="SetPointSizes.html" title="SetPointSizes"><span class="refentrytitle">SetPointSizes</span></a>until graph drawing time. It it is called by <a class="xref" href="dev-internal.html#DrawDots">DrawDots</a>before using point shapes.This was added in PHPlot-5.1.0.</p></dd><dt><span class="term"><a id="DecodeDataType"></a>DecodeDataType()</span></dt><dd><p>Decodes the data type, and sets several member variables that other functionscan use to understand how to process the data array. The variables it setsall have names starting with "datatype_" (refer to <a class="xref" href="dev-vars.html" title="Chapter 10. PHPlot Class Member Variables">Chapter 10, <em>PHPlot Class Member Variables</em></a>).This is called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>.It was added in PHPlot-5.1.2 (where it returned an array of 4 flags, andwas called by several functions that needed to know the structure of thedata array.)In PHPlot-5.1.3, it was changed to set member variables instead.It is now called just once, and the other functions reference the variablesas needed.Starting with PHPlot-6.1.0, it uses the<a class="link" href="dev-var-notes.html#var-datatypes" title="10.2.1. datatypes[]">$datatypes</a> array to set the flags basedon the data type, so it no longer needs to 'know' the actual data type names.</p></dd><dt><span class="term"><a id="DisableCaching"></a>DisableCaching()</span></dt><dd><p>Sends HTTP headers to the browser to disable client-side caching. This iscalled by <a class="xref" href="PrintImage.html" title="PrintImage"><span class="refentrytitle">PrintImage</span></a> if<a class="xref" href="SetBrowserCache.html" title="SetBrowserCache"><span class="refentrytitle">SetBrowserCache</span></a> was used to disable caching.It is also used by <a class="xref" href="StartStream.html" title="StartStream"><span class="refentrytitle">StartStream</span></a>.This was added in PHPlot-5.8.0 by moving code out of PrintImage.</p></dd><dt><span class="term"><a id="DoCallback"></a>DoCallback($reason, ...)</span></dt><dd><p>Call a callback (hook) function. $reason is the name given to thecallback, for example <code class="literal">draw_titles</code>(meaning: call after drawing titles).The reasons are array indexes in the $callbacks class variable. Followingthat are zero or more arguments to pass to the callback, after the imageresource and passthrough arguments. DoCallback does nothing if there is nocallback registered for the given reason, otherwise it calls the callbackfunction. See <a class="xref" href="callbacks.html" title="4.4. Callbacks">Section 4.4, “Callbacks”</a> for more information on callbacks.</p><p>Starting with PHPlot-5.1.3, <code class="function">DoCallback</code> returns the valuereturned by the callback function, if any. If there is no callback defined forthe given reason, <code class="literal">NULL</code> is returned. So it is possible todefine a callback that returns a meaningful value (such as True/False), andstill distinguish the case of where no callback has been set. However, it isoften simpler to test first to see if a callback has been set, using<a class="xref" href="GetCallback.html" title="GetCallback"><span class="refentrytitle">GetCallback</span></a>, before using <code class="function">DoCallback</code>.</p></dd><dt><span class="term"><a id="DrawArea"></a>DrawArea($do_stacked = False)</span></dt><dd><p>Draws an area plot, or a stacked area plot (if the optional argument is True).Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-area" title="3.4.1. Plot Type: area (Area Plot)">area</a> or<a class="link" href="conc-plottypes.html#plottype-stackedarea" title="3.4.14. Plot Type: stackedarea (Stacked Area Plot)">stackedarea</a>.Stacked area plots were added in PHPlot-5.1.1; through PHPlot-5.1.0 thisfunction did not have a parameter and was used only for area plots.</p></dd><dt><span class="term"><a id="DrawBackground"></a>DrawBackground($overwrite = False)</span></dt><dd><p>Draws the image background, either an image file or solid fill or nothing.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> and <a class="xref" href="DrawMessage.html" title="DrawMessage"><span class="refentrytitle">DrawMessage</span></a>.The optional argument $overwrite (added in PHPlot-5.7.0 for DrawMessage)forces the background to be drawn, even if it was already drawn.</p></dd><dt><span class="term"><a id="DrawBar"></a>DrawBar($row, $column, $x1, $y1, $x2, $y2, $data_color, $shade_color, $border_color, $shade_top = TRUE, $shade_side = TRUE)</span></dt><dd><p>Draws a single bar (or bar segment), with either shading or border.The $row and $column indicate which data point is being plotted.Four corner coordinates and 3 color indexes are provided.The first color $data_color is the bar fill color,the second color $shade_color is the shading color, and the thirdcolor $border_color is used for bar borders.(These three come from <a class="xref" href="dev-internal.html#GetBarColors">GetBarColors</a>.)The last two arguments are flags used to suppress the top or side shadingfor certain cases of stacked bar segments.Called by <a class="xref" href="dev-internal.html#DrawBars">DrawBars</a> and <a class="xref" href="dev-internal.html#DrawHorizBars">DrawHorizBars</a>to draw each bar.Called by <a class="xref" href="dev-internal.html#DrawStackedBars">DrawStackedBars</a> and<a class="xref" href="dev-internal.html#DrawHorizStackedBars">DrawHorizStackedBars</a> to draw each bar segment.This was added in PHPlot-5.2.0, moving common code from those 4 functions.</p><p>Starting with PHPlot-5.7.0, the arguments were changed as shown to accommodatea new callback which provides access to drawing coordinates.In previous releases, the usage was<code class="function">DrawBar($x1, $y1, $x2, $y2, $data_color, $alt_color,$shade_top = TRUE, $shade_side = TRUE)</code>.</p><p>In PHPlot-6.0.0, a single $alt_color argument was split into separate$shade_color and $border_color arguments. This corresponds to the changein <a class="xref" href="dev-internal.html#GetBarColors">GetBarColors</a>, and allows for bar charts withindependent control over shading and borders.</p></dd><dt><span class="term"><a id="DrawBars"></a>DrawBars()</span></dt><dd><p>Draws a bar chart plot.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-bars" title="3.4.2. Plot Type: bars (Bar Plot)">bars</a>.If the data type indicates a horizontal bar chart,calls <a class="xref" href="dev-internal.html#DrawHorizBars">DrawHorizBars</a> instead.</p></dd><dt><span class="term"><a id="DrawBoxes"></a>DrawBoxes()</span></dt><dd><p>Draws a box plot.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-boxes" title="3.4.3. Plot Type: boxes (Box Plot)">boxes</a>.This was added in PHPlot-6.1.0.</p></dd><dt><span class="term"><a id="DrawBubbles"></a>DrawBubbles()</span></dt><dd><p>Draws a bubbles plot.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-bubbles" title="3.4.4. Plot Type: bubbles (Bubble Plot)">bubbles</a>.This was added in PHPlot-5.5.0.</p></dd><dt><span class="term"><a id="DrawDataLabel"></a>DrawDataLabel($which_font, $which_angle, $x_world, $y_world, $which_color, $which_text, $which_halign = 'center', $which_valign = 'top', $x_adjustment=0, $y_adjustment=0)</span></dt><dd><p>This function was removed in PHPlot-5.1.3 and replacedby <a class="xref" href="dev-internal.html#DrawDataValueLabel">DrawDataValueLabel</a>.</p></dd><dt><span class="term"><a id="DrawDataValueLabel"></a>DrawDataValueLabel($x_or_y, $row, $column, $x_world, $y_world, $text, $dvl)</span></dt><dd><p>Draws a data value label (previously called "Y data label").These are the above-bar or in-bar labels on bar and stackedbar charts, andthe labels near data points available with some other plot types.</p><p>$x_or_y is 'x' or 'y' to select the font, angle, and formatting type.The $row and $column are passed to <a class="xref" href="dev-internal.html#FormatLabel">FormatLabel</a>for possible use with a custom formatting function.The label is drawn at world coordinates ($x_world, $y_world) after devicecoordinate offset is applied (see below).$text is the label text, which gets formatted with<a class="xref" href="dev-internal.html#FormatLabel">FormatLabel</a> before drawing.</p><p>The $dvl argument is an array with up to 6 variables containing positioningand related information. In $dvl, x_offset and y_offset are pixel offsetsfor the label; h_align and v_align specify the text alignment relativeto the plotting point (see <a class="xref" href="dev-internal.html#DrawText">DrawText</a>);min_width and max_width used to prevent labels from overlapping theirallocated space. If either min_width or max_width is supplied in the $dvlarray, the text is sized before drawing, and if it won't fit in the spacethe label is not drawn. This is used to suppress labels that are too wide tobe drawn inside their bars, for example.The defaults for the X and Y offsets are 0, and the default alignment is(center, center). (The $dvl argument is required, but none of its elementsis required.)</p><p>This function is called by all plot drawing functions which support data valuelabels, if those labels are enabled.</p><p>This function was added in PHPlot-5.1.3 and replaced<a class="xref" href="dev-internal.html#DrawDataLabel">DrawDataLabel</a>.Through PHPlot-5.7.0, 6 separate arguments were used instead of the $dvlarray, and the $row and $column arguments were not present.</p></dd><dt><span class="term"><a id="DrawDot"></a>DrawDot($row, $column, $x_world, $y_world, $color)</span></dt><dd><p>Draws a single marker point ('dot') at the given X and Y world coordinates,using the given color.The $row and $column indicate which data point is being plotted.The $column parameter also selects the marker shape and size,using the arrays set up with SetPointSizes() and SetPointShapes().Called by <a class="xref" href="dev-internal.html#DrawDots">DrawDots</a> to plot point markers.Starting with PHPlot-5.4.0, DrawDot() simply converts the coordinates to devicecoordinates and then calls <a class="xref" href="dev-internal.html#DrawShape">DrawShape</a>. It has no knowledge ofthe available dot shapes.</p><p>Starting with PHPlot-5.7.0, the arguments were changed as shown to accommodatea new callback which provides access to drawing coordinates.In previous releases, the usage was<code class="function">DrawDot($x_world, $y_world, $record, $color)</code>.The old $record argument is equivalent to the new $column argument.</p></dd><dt><span class="term"><a id="DrawDots"></a>DrawDots($paired = False)</span></dt><dd><p>Draws a points plot, or the points for a linepoints plot, including error plots.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-points" title="3.4.11. Plot Type: points (Styled Dot Plot)">points</a>,and by <a class="xref" href="dev-internal.html#DrawLinePoints">DrawLinePoints</a> for thepoints portion of a <a class="link" href="conc-plottypes.html#plottype-linepoints" title="3.4.7. Plot Type: linepoints (Lines and Points Plot)">linepoints</a> plot.$paired is true for <code class="literal">linepoints</code> plots.When $paired is true, DrawDots() draws the points and error bars, and<a class="xref" href="dev-internal.html#DrawLines">DrawLines</a> draws the lines and data labels.(The $paired argument was added in PHPlot-5.1.3.)Starting with PHPlot-6.0.0, DrawDots() also handles error plots,and horizontal points and linepoints plots.</p></dd><dt><span class="term"><a id="DrawDotsError"></a>DrawDotsError($paired = False)</span></dt><dd><p>This function was removed in PHPlot-6.0.0 and merged into<a class="xref" href="dev-internal.html#DrawDots">DrawDots</a>.</p></dd><dt><span class="term"><a id="DrawError"></a>DrawError($error_message, [$where_x], [$where_y])</span></dt><dd><p>Starting with PHPlot-5.0.5, this function is an alias for<a class="xref" href="dev-internal.html#PrintError">PrintError</a> and is retained for compatibility.The $where_x and $where_arguments are now ignored. (Previously theypositioned the error message on the image, but were never used.)Starting with PHPlot-5.7.0, this function is considered deprecated.</p></dd><dt><span class="term"><a id="DrawHorizBars"></a>DrawHorizBars()</span></dt><dd><p>Draws a horizontal bars plot.Called by <a class="xref" href="dev-internal.html#DrawBars">DrawBars</a> when the data type indicates ahorizontal plot.This was added in PHPlot-5.1.2 (but was called by DrawGraph).In PHPlot-5.1.3 it was changed to be called by DrawBars.</p></dd><dt><span class="term"><a id="DrawHorizStackedBars"></a>DrawHorizStackedBars()</span></dt><dd><p>Draws a horizontal stacked bars plot.Called by <a class="xref" href="dev-internal.html#DrawStackedBars">DrawStackedBars</a> when the data type indicates ahorizontal plot.This was added in PHPlot-5.1.3.</p></dd><dt><span class="term"><a id="DrawImageBorder"></a>DrawImageBorder($overwrite = False)</span></dt><dd><p>Draws a border around the image, if enabled by<a class="xref" href="SetImageBorderType.html" title="SetImageBorderType"><span class="refentrytitle">SetImageBorderType</span></a>.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> and <a class="xref" href="DrawMessage.html" title="DrawMessage"><span class="refentrytitle">DrawMessage</span></a>.The optional argument $overwrite (added in PHPlot-5.7.0 for DrawMessage)forces the border to be drawn, even if it was already drawn.</p></dd><dt><span class="term"><a id="DrawLegend"></a>DrawLegend(x,y,type)</span></dt><dd><p>Draws the plot legend. This includes the box, text labels, and color boxesor shapes.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>,but only if legend text has been set using <a class="xref" href="SetLegend.html" title="SetLegend"><span class="refentrytitle">SetLegend</span></a>.</p></dd><dt><span class="term"><a id="DrawLinePoints"></a>DrawLinePoints()</span></dt><dd><p>Draws a linepoints plot, with or without error bars.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-linepoints" title="3.4.7. Plot Type: linepoints (Lines and Points Plot)">linepoints</a>.It simply calls <a class="xref" href="dev-internal.html#DrawLines">DrawLines</a> and <a class="xref" href="dev-internal.html#DrawDots">DrawDots</a>,which handle both the plain and error bar cases.This was added in PHPlot-5.1.3 to provide a function specific to thisplot type.</p></dd><dt><span class="term"><a id="DrawLines"></a>DrawLines($paired = False)</span></dt><dd><p>Draws a line plot, or the lines part of a linepoints plot, including errorplots.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-lines" title="3.4.8. Plot Type: lines (Lines Plot)">lines</a>, and by<a class="xref" href="dev-internal.html#DrawLinePoints">DrawLinePoints</a> for thelines portion of a <a class="link" href="conc-plottypes.html#plottype-linepoints" title="3.4.7. Plot Type: linepoints (Lines and Points Plot)">linepoints</a> plot.$paired is true for <code class="literal">linepoints</code> plots.When $paired is true, DrawLines() draws the lines and data labels, and<a class="xref" href="dev-internal.html#DrawDots">DrawDots</a> draw the points and error bars.(The $paired argument was added in PHPlot-5.1.3.)Starting with PHPlot-6.0.0, DrawLines() also handles error plots,and horizontal lines and linepoints plots.</p></dd><dt><span class="term"><a id="DrawLinesError"></a>DrawLinesError($paired = False)</span></dt><dd><p>This function was removed in PHPlot-6.0.0 and merged into<a class="xref" href="dev-internal.html#DrawLines">DrawLines</a>.</p></dd><dt><span class="term"><a id="DrawOHLC"></a>DrawOHLC($draw_candles, $always_fill = FALSE)</span></dt><dd><p>Draws one of the three types of OHLC (Open/High/Low/Close) plots.If $draw_candles is FALSE, draws a basic OHLC plot(plot type <a class="link" href="conc-plottypes.html#plottype-ohlc" title="3.4.9. Plot Type: ohlc (Basic OHLC Plot)">ohlc</a>).If $draw_candles is TRUE and $always_fill is FALSE,draws a candlestick OHLC plot(plot type <a class="link" href="conc-plottypes.html#plottype-candlesticks" title="3.4.5. Plot Type: candlesticks (OHLC Candlesticks Plot)">candlesticks</a>).If $draw_candles is TRUE and $always_fill is TRUE,draws a filled candlestick OHLC plot(plot type <a class="link" href="conc-plottypes.html#plottype-candlesticks2" title="3.4.6. Plot Type: candlesticks2 (OHLC Filled Candlesticks Plot)">candlesticks2</a>).Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is one of thosethree types.This was added in PHPlot-5.3.0.</p></dd><dt><span class="term"><a id="DrawPieChart"></a>DrawPieChart()</span></dt><dd><p>Draws a pie chart plot.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> with the plot type is<a class="link" href="conc-plottypes.html#plottype-pie" title="3.4.10. Plot Type: pie (Pie Plot)">pie</a>.</p></dd><dt><span class="term"><a id="DrawPieLabel"></a>DrawPieLabel($label_txt, $xc, $yc, $start_angle, $arc_angle, $r)</span></dt><dd><p>Draws a pie chart label. $label_txt is the already-formatted label textstring. ($xc, $yc) is the center of the pie (not the text basepoint).$start_angle is the starting angle in degrees for the segment beinglabeled, which extends for $arc_angle degrees. $r is an array of staticvalues (constant for each pie chart): ellipse parameters and a flag toindicate the text alignment should be reversed.Called by <a class="xref" href="dev-internal.html#DrawPieChart">DrawPieChart</a>.This was added in PHPlot-5.6.0.</p></dd><dt><span class="term"><a id="DrawPlotAreaBackground"></a>DrawPlotAreaBackground()</span></dt><dd><p>Draws the plot area background, either an image file set with<a class="xref" href="SetPlotAreaBgImage.html" title="SetPlotAreaBgImage"><span class="refentrytitle">SetPlotAreaBgImage</span></a>,or else a solid fill color selected by <a class="xref" href="SetPlotBgColor.html" title="SetPlotBgColor"><span class="refentrytitle">SetPlotBgColor</span></a>if enabled with <a class="xref" href="SetDrawPlotAreaBackground.html" title="SetDrawPlotAreaBackground"><span class="refentrytitle">SetDrawPlotAreaBackground</span></a>or else nothing.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>.</p></dd><dt><span class="term"><a id="DrawPlotBorder"></a>DrawPlotBorder($draw_axes=TRUE)</span></dt><dd><p>Draws the border around the plot area.This draws zero to four lines around the plot area (depending on<a class="xref" href="SetPlotBorderType.html" title="SetPlotBorderType"><span class="refentrytitle">SetPlotBorderType</span></a>).The $draw_axes argument (added in PHPlot-5.6.0) is true for all plot typesexcept pie charts, and controls the default value if SetPlotBorderType() wasnot called.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>.</p></dd><dt><span class="term"><a id="DrawShape"></a>DrawShape($x, $y, $record, $color, $allow_none = TRUE)</span></dt><dd><p>Draws a single marker point ('dot' or 'shape') at the given X and Y device(pixel) coordinates, using the given color. The $record parameter selects themarker shape and size using the arrays set up with SetPointSizes() andSetPointShapes(); they are not passed as arguments themselves.Called by <a class="xref" href="dev-internal.html#DrawDot">DrawDot</a> and <a class="xref" href="dev-internal.html#DrawLegend">DrawLegend</a>.This is the function that knows which shapes are available and how to drawthem. (<a class="xref" href="SetPointShapes.html" title="SetPointShapes"><span class="refentrytitle">SetPointShapes</span></a> also has a list of valid shapes.)This was added at PHPlot-5.4.0 by moving the shape drawing code out ofDrawDot(), leaving behind only the conversion from world to device coordinates.This was necessary because DrawLegend() needs to specify marker positionsin pixel coordinates when using point shapes instead of color boxes.</p><p>If the optional $allow_none is FALSE, then the function will substituteanother shape for the special 'none' shape (which suppresses a shape markerfor a data set in a linepoints plot). This is used when drawing a legend, toensure that there is a marker shape for each data set. This argument wasadded in PHPlot-6.0.0.</p></dd><dt><span class="term"><a id="DrawSquared"></a>DrawSquared()</span></dt><dd><p>Draws a squared (stepped lines) plot.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-squared" title="3.4.12. Plot Type: squared (Squared Plot)">squared</a>.</p></dd><dt><span class="term"><a id="DrawSquaredArea"></a>DrawSquaredArea($do_stacked = False)</span></dt><dd><p>Draws a squared area plot, or a stacked squared area plot(if the optional argument is True).Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-squaredarea" title="3.4.13. Plot Type: squaredarea (Squared Area Plot)">squaredarea</a> or<a class="link" href="conc-plottypes.html#plottype-stackedsquaredarea" title="3.4.16. Plot Type: stackedsquaredarea (Stacked Squared Area Plot)">stackedsquaredarea</a>.This was added in PHPlot-6.2.0.</p></dd><dt><span class="term"><a id="DrawStackedBars"></a>DrawStackedBars()</span></dt><dd><p>Draws a stacked bars chart plot.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-stackedbars" title="3.4.15. Plot Type: stackedbars (Stacked Bar Plot)">stackedbars</a>.If the data type indicates a horizontal plot,calls <a class="xref" href="dev-internal.html#DrawHorizStackedBars">DrawHorizStackedBars</a> instead.</p></dd><dt><span class="term"><a id="DrawText"></a>DrawText($font, $angle, $xpos, $ypos, $color, $text, $halign = 'left', $valign = 'bottom')</span></dt><dd><p>Draws a string of text $text, at position ($xpos, $ypos).The font settings are specified by $font, which is one of the text elementnames used by <a class="xref" href="SetFont.html" title="SetFont"><span class="refentrytitle">SetFont</span></a> such as <code class="literal">'title'</code>or <code class="literal">'x_label'</code>. An empty string or NULL can be used to getthe <code class="literal">'generic'</code> font. For backward compatibility,a font array (from the PHPlot object $fonts[] array) can be used too.</p><p>The text is drawn at angle $angle (built-in fonts can be used at 0and 90 degrees only, TrueType at any angle). $color is a GD colorindex for the image. Text alignment relative to the (x,y) point iscontrolled with $halign (<code class="literal">center</code>,<code class="literal">left</code>, or <code class="literal">right</code>)and $valign (<code class="literal">center</code>, <code class="literal">bottom</code>,or <code class="literal">top</code>).</p><p>Multi-line text strings are supported. This function accounts for thelimitations and differences in GD text drawing routines for built-in andTrueType fonts.Called by numerous functions which place text on the plot.</p><p>Starting with PHPlot-5.0.5, this function just calls<a class="xref" href="dev-internal.html#ProcessText">ProcessText</a> in text drawing mode. DrawText should be usedby all internal PHPlot code that needs to draw text, and ProcessText shouldonly be used by DrawText and SizeText.</p><p>Starting with PHPlot-5.1.0, $font can be NULL or an empty string touse the <span class="emphasis"><em>generic</em></span> font.This was intended to allow callbacks to avoid having to reference the internalclass array variable which stores font information.</p><p>Starting with PHPlot-6.0.0, the preferred form for $font is the name of aPHPlot text element, with use of the $fonts[] member variable deprecated.This further eases use of DrawText by callbacks, which can specify a fontother than 'generic' without referencing internal class variables.</p></dd><dt><span class="term"><a id="DrawThinBarLines"></a>DrawThinBarLines()</span></dt><dd><p>Draws a thin bar lines plot. This is sometimes called an impulse plot.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> when the plot type is<a class="link" href="conc-plottypes.html#plottype-thinbarline" title="3.4.17. Plot Type: thinbarline (Thin Bar Line Plot)">thinbarline</a>.This function draws both vertical and horizontal variants of this plot type.</p></dd><dt><span class="term"><a id="DrawTitle"></a>DrawTitle()</span></dt><dd><p>Draws the main plot title as set with <a class="xref" href="SetTitle.html" title="SetTitle"><span class="refentrytitle">SetTitle</span></a>. This is centered at thevery top of the image.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>.</p></dd><dt><span class="term"><a id="DrawXAxis"></a>DrawXAxis()</span></dt><dd><p>Draws the X (horizontal) axis, including the axis line,tick marks and labels,and also draws the vertical grid lines.All of these except the axis line are done in <a class="xref" href="dev-internal.html#DrawXTicks">DrawXTicks</a>.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>.</p></dd><dt><span class="term"><a id="DrawXDataLabel"></a>DrawXDataLabel($xlab, $xpos, $row, $do_lines=FALSE)</span></dt><dd><p>Draws an axis data label for an X value. The labels are above or below the plotarea or both, depending on the value set with<a class="xref" href="SetXDataLabelPos.html" title="SetXDataLabelPos"><span class="refentrytitle">SetXDataLabelPos</span></a>.The $row value indicates the row index in the data array for this label; itis used to position the data label line, and for custom label formatting.If $do_lines is true, this calls <a class="xref" href="dev-internal.html#DrawXDataLine">DrawXDataLine</a> to draw aline from the label to the point, if enabled and supported by the plot type.</p><p>This function is used by vertical plots.It is called by plot drawing routines for all plot types except<code class="literal">pie</code>:<a class="xref" href="dev-internal.html#DrawArea">DrawArea</a>,<a class="xref" href="dev-internal.html#DrawBars">DrawBars</a>,<a class="xref" href="dev-internal.html#DrawDots">DrawDots</a>,<a class="xref" href="dev-internal.html#DrawThinBarLines">DrawThinBarLines</a>,<a class="xref" href="dev-internal.html#DrawLines">DrawLines</a>,<a class="xref" href="dev-internal.html#DrawSquared">DrawSquared</a>, and<a class="xref" href="dev-internal.html#DrawStackedBars">DrawStackedBars</a>.</p></dd><dt><span class="term"><a id="DrawXDataLine"></a>DrawXDataLine($xpos, $row)</span></dt><dd><p>Draws X data label lines, which are vertical lines from the bottom or topof the plot to the data points. This is enabled with<a class="xref" href="SetDrawXDataLabelLines.html" title="SetDrawXDataLabelLines"><span class="refentrytitle">SetDrawXDataLabelLines</span></a>. The lines are drawn from theposition (above, below, or both) of the X axis data labels, which are set with<a class="xref" href="SetXDataLabelPos.html" title="SetXDataLabelPos"><span class="refentrytitle">SetXDataLabelPos</span></a>.Called by <a class="xref" href="dev-internal.html#DrawXDataLabel">DrawXDataLabel</a>.</p></dd><dt><span class="term"><a id="DrawXErrorBars"></a>DrawXErrorBars($x, $y $error_plus, $error_minus, $color)</span></dt><dd><p>Draws an error bar set for the point at world coordinates ($x, $y).$error_plus and $error_minus are the X error amounts (in world coordinates).Both are non-negative values.Called by <a class="xref" href="dev-internal.html#DrawDots">DrawDots</a> and <a class="xref" href="dev-internal.html#DrawLines">DrawLines</a> whenthe data type indicates a horizontal error plot.This was added in PHPlot-6.1.0 when horizontal error plots were implemented.</p></dd><dt><span class="term"><a id="DrawXTick"></a>DrawXTick($x, $x_pixels)</span></dt><dd><p>Draws a single X value tick mark and its label.These can appear on the bottom of the graph, top of the graph, along theX axis (even if it is in the middle somewhere), on both sides, or nowhere,as set with <a class="xref" href="SetXTickPos.html" title="SetXTickPos"><span class="refentrytitle">SetXTickPos</span></a> and<a class="xref" href="SetXTickLabelPos.html" title="SetXTickLabelPos"><span class="refentrytitle">SetXTickLabelPos</span></a>.$x is the X value of the tick, and $x_pixels is its device coordinate value.Called by <a class="xref" href="dev-internal.html#DrawXTicks">DrawXTicks</a>.This was added at PHPlot-5.0.5 by splitting the code out of DrawXTicks,for symmetry with DrawYTicks.Through PHPlot-5.7.0, $x was passed to this function already formatted with<a class="xref" href="dev-internal.html#FormatLabel">FormatLabel</a>. Starting with PHPlot-5.8.0, the actual tickvalue is passed, so <code class="function">DrawXTick</code> can decide whether ornot to format it.</p></dd><dt><span class="term"><a id="DrawXTicks"></a>DrawXTicks()</span></dt><dd><p>Draws the vertical grid lines, the tick marks, and tick labels.Calls <a class="xref" href="dev-internal.html#CalcTicks">CalcTicks</a> to calculate the tick parameters.Calls <a class="xref" href="dev-internal.html#DrawXTick">DrawXTick</a> to draw each tick mark and its label.Called by <a class="xref" href="dev-internal.html#DrawXAxis">DrawXAxis</a>.</p></dd><dt><span class="term"><a id="DrawXTitle"></a>DrawXTitle()</span></dt><dd><p>Draws the X axis title. There can be zero, one, or two of them depending onthe position parameter specified in <a class="xref" href="SetXTitle.html" title="SetXTitle"><span class="refentrytitle">SetXTitle</span></a>.Calls <a class="xref" href="dev-internal.html#DrawText">DrawText</a> to actually draw the title(s).Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>.</p></dd><dt><span class="term"><a id="DrawYAxis"></a>DrawYAxis()</span></dt><dd><p>Draws the Y (vertical) axis, including the axis line,tick marks and labels,and also draws the horizontal grid lines.All of these except the axis line are done in <a class="xref" href="dev-internal.html#DrawYTicks">DrawYTicks</a>.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>.</p></dd><dt><span class="term"><a id="DrawYDataLabel"></a>DrawYDataLabel($ylab, $ypos, $row, $do_lines=FALSE)</span></dt><dd><p>Draws an axis data label for a Y value. The labels are along the Y axis orside of the plot, or both, depending on the value set with<a class="xref" href="SetYDataLabelPos.html" title="SetYDataLabelPos"><span class="refentrytitle">SetYDataLabelPos</span></a>.The $row value indicates the row index in the data array for this label; itis used for custom label formatting.If $do_lines is true, this calls <a class="xref" href="dev-internal.html#DrawYDataLine">DrawYDataLine</a> to draw aline from the label to the point, if enabled and supported by the plot type.This function is used by horizontal plots, and was added in PHPlot-5.1.2.Called by horizontal plot drawing functions such as<a class="xref" href="dev-internal.html#DrawHorizBars">DrawHorizBars</a>.The $do_lines argument was added in PHPlot-6.0.0 when horizontal plotssupporting data label lines were first available.</p></dd><dt><span class="term"><a id="DrawYDataLine"></a>DrawYDataLine($ypos, $row)</span></dt><dd><p>Draws Y data label lines, which are horizontal lines from the left or rightside of the plot to the data points. This is enabled with<a class="xref" href="SetDrawYDataLabelLines.html" title="SetDrawYDataLabelLines"><span class="refentrytitle">SetDrawYDataLabelLines</span></a>, and is only valid with horizontalplots which support Y data label lines. The lines are drawn from theposition (left, right, or both) of the Y axis data labels, which are set with<a class="xref" href="SetYDataLabelPos.html" title="SetYDataLabelPos"><span class="refentrytitle">SetYDataLabelPos</span></a>.Called by <a class="xref" href="dev-internal.html#DrawYDataLabel">DrawYDataLabel</a>.This was added in PHPlot-6.0.0.</p></dd><dt><span class="term"><a id="DrawYErrorBar"></a>DrawYErrorBar($x_world, $y_world, $error_height, $color)</span></dt><dd><p>This function was removed in PHPlot-6.1.0 and replaced with<a class="xref" href="dev-internal.html#DrawYErrorBars">DrawYErrorBars</a>.</p></dd><dt><span class="term"><a id="DrawYErrorBars"></a>DrawYErrorBars($x, $y $error_plus, $error_minus, $color)</span></dt><dd><p>Draws an error bar set for the point at world coordinates ($x, $y).$error_plus and $error_minus are the Y error amounts (in world coordinates).Both are non-negative values.Called by <a class="xref" href="dev-internal.html#DrawDots">DrawDots</a> and <a class="xref" href="dev-internal.html#DrawLines">DrawLines</a> whenthe data type indicates a vertical error plot.This was added in PHPlot-6.1.0, replacing <a class="xref" href="dev-internal.html#DrawYErrorBar">DrawYErrorBar</a>(which drew only 1 of the error bars for a point).</p></dd><dt><span class="term"><a id="DrawYTick"></a>DrawYTick($y, $y_pixels)</span></dt><dd><p>Draws a single Y value tick mark and its label.These can appear on the left of the graph, right of the graph, along theY axis (even if it is in the middle somewhere), on both sides, or nowhere,as set with <a class="xref" href="SetYTickPos.html" title="SetYTickPos"><span class="refentrytitle">SetYTickPos</span></a> and<a class="xref" href="SetYTickLabelPos.html" title="SetYTickLabelPos"><span class="refentrytitle">SetYTickLabelPos</span></a>.$y is the Y value of the tick, and $y_pixels is its device coordinate value.Called by <a class="xref" href="dev-internal.html#DrawYTicks">DrawYTicks</a>.Through PHPlot-5.7.0, $y was passed to this function already formatted with<a class="xref" href="dev-internal.html#FormatLabel">FormatLabel</a>. Starting with PHPlot-5.8.0, the actual tickvalue is passed, so <code class="function">DrawYTick</code> can decide whether ornot to format it.</p></dd><dt><span class="term"><a id="DrawYTicks"></a>DrawYTicks()</span></dt><dd><p>Draws the horizontal grid lines, the tick marks, and tick labels.Calls <a class="xref" href="dev-internal.html#DrawYTick">DrawYTick</a> to draw each tick mark and its label.Called by <a class="xref" href="dev-internal.html#DrawYAxis">DrawYAxis</a>.</p></dd><dt><span class="term"><a id="DrawYTitle"></a>DrawYTitle()</span></dt><dd><p>Draws the Y axis title. There can be zero, one, or two of them depending onthe position parameter specified in <a class="xref" href="SetYTitle.html" title="SetYTitle"><span class="refentrytitle">SetYTitle</span></a>.Calls <a class="xref" href="dev-internal.html#DrawText">DrawText</a> to actually draw the title(s).Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>.</p></dd><dt><span class="term"><a id="FindDataLimits"></a>FindDataLimits()</span></dt><dd><p>Finds the limits of the data. Using the data_type and the data array, itgoes through the points and determines the minimum and maximum X and Y values.It stores the min and max Y values for each row (plot line) in theclass arrays data_min and data_max.(Before PHPlot-5.0.4, these were stored back into the data arraywith special index values MINY (-1) and MAXY (-2).)It also stores the overall min and max X and Y values as min_x, max_x,min_y, and max_y.It also stores the length of the longest data label in max_t.Starting with PHPlot-5.0.5, this is only called once by<a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a>. (In PHPlot-5.0.4 and earlier, this was calledfrom various places, with a flag data_limits_done to indicate it was called.)</p></dd><dt><span class="term"><a id="FormatLabel"></a>FormatLabel($which_pos, $which_lab, ...)</span></dt><dd><p>Formats a value for use as a tick, data, or pie chart label.This implements the format type selected with<a class="xref" href="SetXLabelType.html" title="SetXLabelType"><span class="refentrytitle">SetXLabelType</span></a>, <a class="xref" href="SetYLabelType.html" title="SetYLabelType"><span class="refentrytitle">SetYLabelType</span></a>,<a class="xref" href="SetXDataLabelType.html" title="SetXDataLabelType"><span class="refentrytitle">SetXDataLabelType</span></a>, <a class="xref" href="SetYDataLabelType.html" title="SetYDataLabelType"><span class="refentrytitle">SetYDataLabelType</span></a>,and <a class="xref" href="SetPieLabelType.html" title="SetPieLabelType"><span class="refentrytitle">SetPieLabelType</span></a>.If no formatting is in effect for that label type ($which_pos), it returns thelabel string $which_lab as-is. Otherwise, it formats it as directed. Thiscan be a floating point number (formatted with <a class="xref" href="dev-internal.html#number_format">number_format</a>),a date/time value, or it can be formatted with <code class="function">sprintf</code>or a user-defined function (type 'custom').Any additional arguments after the first 2 are passed through to a custom labelformatting function. This is used to make the data row and column availableto the user-defined function (if applicable for the label type).</p><p>Called by several functions that need to format label values.Separation of data and tick label formatting was available starting withPHPlot-5.1.0. Use with pie chart labels was added in PHPlot-5.6.0.Support for additional arguments for custom functions was addedin PHPlot-5.8.0.</p></dd><dt><span class="term"><a id="FormatPieLabel"></a>FormatPieLabel($index, $pie_label_source, $arc_angle, $slice_weight)</span></dt><dd><p>Formats a pie chart label. This first gets the initial value, based onthe $source argument to <a class="xref" href="SetPieLabelType.html" title="SetPieLabelType"><span class="refentrytitle">SetPieLabelType</span></a>, which is passedin as $pie_label_source. It may use $index, $arc_angle, or $slice_weight,or a combination of those. Then it formats that value using<a class="xref" href="dev-internal.html#FormatLabel">FormatLabel</a> and returns the result.Called by <a class="xref" href="dev-internal.html#DrawPieChart">DrawPieChart</a>.This was added in PHPlot-5.6.0.</p></dd><dt><span class="term"><a id="GetBarColors"></a>GetBarColors($row, $idx, &$vars, &$data_color, &$shade_color, &$border_color)</span></dt><dd><p>Gets the color indexes to be used for a bar plot.This is used by bar and stackedbar plot drawing functions, andaccounts for a custom data color callback if defined.$row and $idx are the indexes for the current bar or bar segment.$vars is an array argument that maintains information across calls - thecaller allocates an empty array, and this function updates it.The color index for bar filling is returned in $data_color.$shade_color is the color index to use for shading (if shading is on).$border_color is the color index to use for the bar border (if on).This was added in PHPlot-5.2.0, moving common code into a function.In PHPlot-6.0.0, a single $alt_color argument was split into separate$shade_color and $border_color arguments.</p></dd><dt><span class="term"><a id="GetColorIndex"></a>GetColorIndex(&$color, $default_color_index=0)</span></dt><dd><p>Allocate a GD color index for a color given as a 4 component array (R,G,B,A)$color. Returns a color index to be used in GD drawing functions.The color returned is the exact color requested if it already exists in theimage, or if can be allocated.For palette images, if the color map is full, no new colors can be allocated,and this function will return an index to the closest existing color.For truecolor images, this function always returns an index for the exactrequested color.If $color is empty or unset, returns $default_color_index instead, withoutallocating a new color.This was added in PHPlot-5.2.0, replacing the second half of<a class="xref" href="dev-internal.html#SetIndexColor">SetIndexColor</a>.The $default_color_index argument was added in PHPlot-5.7.0, and the $colorargument was changed to a reference (so an unset variable can be passedwithout an error).</p></dd><dt><span class="term"><a id="GetColorIndexArray"></a>GetColorIndexArray($color_array, $max_colors)</span></dt><dd><p>Allocates GD color indexes for each color in the array $color_array, which aregiven as 4 component arrays (R,G,B,A). Up to $max_colors colors will beallocated. (This is used to limit the number of allocated data colors to thenumber of data sets in the plot, for example.)<a class="xref" href="dev-internal.html#GetColorIndex">GetColorIndex</a> is used to allocate each color.Returns an array of GD color indexes to be used in GD drawing functions.This was added in PHPlot-5.3.1.</p></dd><dt><span class="term"><a id="GetDarkColorIndex"></a>GetDarkColorIndex($color)</span></dt><dd><p>Allocate a GD color index for a darker shade of a color given as a 4 componentarray (R,G,B,A).Returns a color index to be used in GD drawing functions.The method used is to subtract 48 from each red, green, and blue component(without letting any go negative).The alpha component is not adjusted.The color returned is the exact color requested if it already exists in theimage, or if can be allocated, else the closest color available.This is used for shadow colors (for example, in bar charts and pie charts).This was added in PHPlot-5.2.0, replacing the second half of<a class="xref" href="dev-internal.html#SetIndexDarkColor">SetIndexDarkColor</a>.</p></dd><dt><span class="term"><a id="GetDarkColorIndexArray"></a>GetDarkColorIndexArray($color_array, $max_colors)</span></dt><dd><p>Allocates GD color indexes for a darker shade of each color in the array$color_array, which are given as 4 component arrays (R,G,B,A). Up to$max_colors colors will be allocated. (This is used to limit the number ofallocated dark-shade data colors to the number of data sets in the plot,for example.)<a class="xref" href="dev-internal.html#GetDarkColorIndex">GetDarkColorIndex</a> is used to allocate each color.Returns an array of GD color indexes to be used in GD drawing functions.This was added in PHPlot-5.3.1.</p></dd><dt><span class="term"><a id="GetDataColor"></a>GetDataColor($row, $idx, &$vars, &$data_color, $extra=0)</span></dt><dd><p>Gets the color index to be used for a data element (a point or linesegment, for example).This is used by multiple plot drawing functions to get the data color,accounting for a custom data color callback if defined.$row and $idx are the indexes for the data point. $vars is an array argumentthat maintains information across calls - the caller allocates an emptyarray, and this function updates it.The color index to use is returned in $data_color.$extra contains extra information for a data color callback.This was added in PHPlot-5.2.0, moving common code into a function.</p></dd><dt><span class="term"><a id="GetDataErrorColors"></a>GetDataErrorColors($row, $idx, &$vars, &$data_color, &$error_color, $extra=0)</span></dt><dd><p>This is an extended version of <a class="xref" href="dev-internal.html#GetDataColor">GetDataColor</a> which is usedfor error bar plots. It returns two color index values: $data_color for thedata element, and $error_color for the error bar.This is used by error plot drawing functions, and accounts for a customdata color callback if defined.$row and $idx are the indexes for the data point. $vars is an array argumentthat maintains information across calls - the caller allocates an emptyarray, and this function updates it.$extra contains extra information for a data color callback.This was added in PHPlot-5.2.0, moving common code into a function.</p></dd><dt><span class="term"><a id="GetDefaultTTFont"></a>GetDefaultTTFont()</span></dt><dd><p>Returns the default TrueType font name. If no default font has been setusing <a class="xref" href="SetDefaultTTFont.html" title="SetDefaultTTFont"><span class="refentrytitle">SetDefaultTTFont</span></a>, the first time this is called itwill go through a list of likely sans-serif fonts, trying to find onethat works. The first one that works, or the last one if none works, willbe set as the default font.This was added in PHPlot-5.1.3, replacing the static initialization ofdefault font.</p></dd><dt><span class="term"><a id="GetGridSetting"></a>GetGridSetting($xy)</span></dt><dd><p>Returns a flag indicating whether to draw the grid along the axisindicated by $xy ('x' or 'y'). This implements the grid default whichdiffers for horizontal and vertical plots.This was added in PHPlot-6.0.0, replacing CalcGridSettings().</p></dd><dt><span class="term"><a id="GetImage"></a>GetImage($image_filename, &$width, &$height)</span></dt><dd><p>Reads an image file from $image_filename, stores the width and height(in pixels) in the $width and $height reference arguments, and returnsa PHP GD image resource of the image.This is used by <a class="xref" href="dev-internal.html#SetInputFile">SetInputFile</a> and <a class="xref" href="dev-internal.html#tile_img">tile_img</a>.Errors go to <a class="xref" href="dev-internal.html#PrintError">PrintError</a>; there is no way for the scriptto recover. Possible errors include an image file type which is unsupportedby PHP GD, or a corrupt image file.Note: This was added at PHPlot-5.0.4, by moving common code from thetwo calling functions.</p></dd><dt><span class="term"><a id="GetImageBorderWidth"></a>GetImageBorderWidth()</span></dt><dd><p>This returns the image border width, as set with<a class="xref" href="SetImageBorderWidth.html" title="SetImageBorderWidth"><span class="refentrytitle">SetImageBorderWidth</span></a> or as defaulted.It is used by <a class="xref" href="dev-internal.html#CalcMargins">CalcMargins</a> to account for image border width,and by <a class="xref" href="dev-internal.html#DrawImageBorder">DrawImageBorder</a> when drawing the image border.This was added in PHPlot-5.1.2.</p></dd><dt><span class="term"><a id="GetImageType"></a>GetImageType(&$mime_type, &$output_f)</span></dt><dd><p>Given the current file type (e.g. 'png'), this sets the MIME type for theimage (e.g. 'image/png') and the name of the GD output function (e.g.'imagepng') corresponding to that type. The results are stored in thearguments, and TRUE is returned unless an error occurs.It is used by <a class="xref" href="PrintImage.html" title="PrintImage"><span class="refentrytitle">PrintImage</span></a> and <a class="xref" href="EncodeImage.html" title="EncodeImage"><span class="refentrytitle">EncodeImage</span></a>.This was added in PHPlot-5.5.0, from code moved out of PrintImage.</p></dd><dt><span class="term"><a id="GetLegendPosition"></a>GetLegendPosition($width, $height)</span></dt><dd><p>This calculates and returns the device coordinates (as a 2 element array X,Y)of the upper left corner of the legend box. $width and $height are the size ofthe legend box. It accounts for the positioning mode, reference point,base point, and pixel offset as set with <a class="xref" href="SetLegendPosition.html" title="SetLegendPosition"><span class="refentrytitle">SetLegendPosition</span></a>.Called by <a class="xref" href="dev-internal.html#DrawLegend">DrawLegend</a>.This was added in PHPlot-5.4.0.</p></dd><dt><span class="term"><a id="GetLegendSizeParams"></a>GetLegendSizeParams()</span></dt><dd><p>This calculates a number of parameters that determine how to draw thelegend, and returns an array containing those variables and their values.Called by <a class="xref" href="GetLegendSize.html" title="GetLegendSize"><span class="refentrytitle">GetLegendSize</span></a> (which only uses the 'width' and'height' elements), and by <a class="xref" href="dev-internal.html#DrawLegend">DrawLegend</a>.This was added in PHPlot-5.4.0.</p></dd><dt><span class="term"><a id="GetLineSpacing"></a>GetLineSpacing($font)</span></dt><dd><p>Given a font array variable, returns the proper spacing in pixels between linesof text using that font. This works for both GD and TrueType fonts. See also<a class="xref" href="SetLineSpacing.html" title="SetLineSpacing"><span class="refentrytitle">SetLineSpacing</span></a>.Used by <a class="xref" href="dev-internal.html#ProcessTextGD">ProcessTextGD</a>, <a class="xref" href="dev-internal.html#ProcessTextTTF">ProcessTextTTF</a>,and <a class="xref" href="dev-internal.html#DrawLegend">DrawLegend</a>.Note: This was added at PHPlot-5.0.6, with support for mixing TTF and GDfonts.</p></dd><dt><span class="term"><a id="GetRangeEndAdjust"></a>GetRangeEndAdjust($which, &$adjust)</span></dt><dd><p>Applies a default to $adjust, the plot range end adjustment factor. $which is'x' or 'y'. If $adjust is already set, the function does nothing.Otherwise, it uses the current plot type to apply a default setting to $adjust.See the notes on the <code class="literal">adjust_type</code> entry in<a class="xref" href="dev-var-notes.html#var-plots" title="10.2.5. plots[]">Section 10.2.5, “plots[]”</a> for more on the per-plot-type adjustment mode.This is used by <a class="xref" href="dev-internal.html#CalcPlotRange">CalcPlotRange</a>.It was added at PHPlot-6.0.0.</p></dd><dt><span class="term"><a id="GetTextAlignment"></a>GetTextAlignment($sin_t, $cos_t, &$h_align, &$v_align, $reverse = FALSE)</span></dt><dd><p>Selects the best alignment for text which is at a specific angle ($sin_t,$cos_t) from a point. The result is returned in $h_align and $v_align,suitable for use with <a class="xref" href="dev-internal.html#DrawText">DrawText</a>.The alignment is chosen from 8 possible values (left/center, center/bottom,etc.) to keep the closest edge or corner of the text box at a fixeddistance from the reference point (typically the center of a pie chart, ora plotted point), regardless of the text string size.For example, text at 0 degrees is left/center aligned, and text at 90 degreesis center/bottom aligned.If $reverse is true, the alignment is reversed; this is used for text insidean ellipse but close to the circumference.Used by <a class="xref" href="dev-internal.html#CheckDataValueLabels">CheckDataValueLabels</a>and <a class="xref" href="dev-internal.html#DrawPieLabel">DrawPieLabel</a>.Note: This was added at PHPlot-5.6.0 by moving code out of<a class="xref" href="dev-internal.html#CheckDataValueLabels">CheckDataValueLabels</a>.</p></dd><dt><span class="term"><a id="initialize"></a>initialize($imagecreate_function, $width, $height, $output_file, $input_file)</span></dt><dd><p>Initialize a newly created object. This is called from the two classconstructors, <a class="xref" href="PHPlot.html" title="PHPlot"><span class="refentrytitle">PHPlot</span></a> and <a class="xref" href="PHPlot-truecolor.html" title="PHPlot_truecolor"><span class="refentrytitle">PHPlot_truecolor</span></a>.$imagecreate_function is the name of the GD function used to create an image(<code class="function">imagecreate</code> or <code class="function">imagecreatetruecolor</code>).The other arguments are the same as in the class constructors, except thedefaults are already applied.This was added in PHPlot-5.6.0 by moving duplicated code from the twoconstructors into a shared function.</p></dd><dt><span class="term"><a id="NeedDataDarkColors"></a>NeedDataDarkColors()</span></dt><dd><p>Allocates darker data colors, which are used for shading.This is called by graph drawing functions such as <a class="xref" href="dev-internal.html#DrawPieChart">DrawPieChart</a>if they need to use these colors for shading.This was added in PHPlot-5.2.0.</p></dd><dt><span class="term"><a id="NeedErrorBarColors"></a>NeedErrorBarColors()</span></dt><dd><p>Allocates colors used for error bars.This is called by any graph drawing functions that is going to draw error bars.This was added in PHPlot-5.2.0.</p></dd><dt><span class="term"><a id="number_format"></a>number_format($number, $decimals=0)</span></dt><dd><p>Formats a floating point number, like PHP's number_format(), insertinga decimal separator and thousands groups separators. Unlike the PHPfunction, this uses variables in the PHPlot class to select the separators.The separators can be set with <a class="xref" href="SetNumberFormat.html" title="SetNumberFormat"><span class="refentrytitle">SetNumberFormat</span></a>, or bydefault PHPlot will attempt to get locale-specific values.For example, 1234+(56/100) will be returned as "1,234.56" if the locale is"en_US", and as "1.234,56" if the locale is "de_DE".As a fall-back, if locale information is not available, '.' is used fordecimal point, and ',' for thousands separator. This fall-back is equivalentto the behavior in PHPlot 5.0rc3 and earlier.This is used by <a class="xref" href="dev-internal.html#FormatLabel">FormatLabel</a> when the formatting type is<code class="literal">data</code>, and also for the pie chart labels in<a class="xref" href="dev-internal.html#DrawPieChart">DrawPieChart</a>.</p></dd><dt><span class="term"><a id="pad_array"></a>pad_array(&$arr, $size)</span></dt><dd><p>Pads an array $arr with copies of itself until it reaches the given size.If $arr is a scalar, it will first be converted to an array with oneelement. Then, if $arr has fewer than $size elements, elements of $arrstarting from the first will be appended until it reaches $size elements.This only works on zero-based sequential integer indexed arrays.Called by <a class="xref" href="dev-internal.html#PadArrays">PadArrays</a>, <a class="xref" href="SetPointShapes.html" title="SetPointShapes"><span class="refentrytitle">SetPointShapes</span></a>,and <a class="xref" href="SetPointSizes.html" title="SetPointSizes"><span class="refentrytitle">SetPointSizes</span></a>.This replaced <a class="xref" href="dev-internal.html#array_pad_array">array_pad_array</a> at PHPlot-5.0.4,however that had an unused 3rd argument, and worked on general indexed arrays.</p></dd><dt><span class="term"><a id="PadArrays"></a>PadArrays()</span></dt><dd><p>Pads the style arrays (line_widths, line_styles, data_colors, etc.) so theyare all large enough to contain an entry for each data set or plot line.This uses <a class="xref" href="dev-internal.html#pad_array">pad_array</a>.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> before drawing anything.</p></dd><dt><span class="term"><a id="PrintError"></a>PrintError($error_message)</span></dt><dd><p>Handles a fatal error within PHPlot. Starting with PHPlot-5.0.5 this and<a class="xref" href="dev-internal.html#DrawError">DrawError</a> are identical. PrintError attempts to draw theerror message $error_message into the image, and then output the image.This method is used because PHPlot is normally expected to output an image,and text output would not be displayed properly. (If no image resource wasavailable, and the <a class="xref" href="SetIsInline.html" title="SetIsInline"><span class="refentrytitle">SetIsInline</span></a> flag is not on, PHPlotwill send a 500 Internal Server Error header.) PrintError uses<a class="xref" href="DrawMessage.html" title="DrawMessage"><span class="refentrytitle">DrawMessage</span></a> to actually draw the message onto the image.After this, PrintError uses the PHP trigger_error() function to signal a usererror. This is normally fatal to the script, unless caught. This will alsoresult in the error message written to the error output stream, whichtypically ends up in a web server error log.</p><p>(Through PHPlot-5.0.4, PrintError wrote an error message to standard outputand exited.)</p></dd><dt><span class="term"><a id="ProcessText"></a>ProcessText($draw_it, $font_id, $angle, $x, $y, $color, $text, $halign, $valign)</span></dt><dd><p>This function acts as a bridge, or switch, between the two functions<a class="xref" href="dev-internal.html#SizeText">SizeText</a> and <a class="xref" href="dev-internal.html#DrawText">DrawText</a>, which handleboth GD and TTF text,and the functions which specifically handle GD text or TTF text.The arguments to this function are the same as<a class="xref" href="dev-internal.html#DrawText">DrawText</a> except for an additional first argument$draw_it. If $draw_it is true, text is drawn. This is used by DrawText. If$draw_it is false, only the bounding box size of the text is calculated andreturned. This is used by SizeText. In text sizing mode, the x, y, color,halign, and valign arguments are ignored, as they are not needed whencalculating the text bounding box size.This function is only called by<a class="xref" href="dev-internal.html#SizeText">SizeText</a> and <a class="xref" href="dev-internal.html#DrawText">DrawText</a>, and calls either<a class="xref" href="dev-internal.html#ProcessTextTTF">ProcessTextTTF</a> or <a class="xref" href="dev-internal.html#ProcessTextGD">ProcessTextGD</a>.</p><p><code class="function">ProcessText</code> examines the $font_id argument and handlesthe variations described under <a class="xref" href="dev-internal.html#DrawText">DrawText</a>. If $font_id isan array, it is assumed to be an element of the member array $fonts[], andis passed as-is to the lower level functions.If it is a string that exists as an index to $fonts[], that font array isused. In all other cases, the <code class="literal">generic</code> font is used.</p></dd><dt><span class="term"><a id="ProcessTextGD"></a>ProcessTextGD($draw_it, $font, $angle, $x, $y, $color, $text, $h_factor, $v_factor)</span></dt><dd><p>Draws GD fixed-font text, or calculates the size of GD fixed-font text.This is only called by <a class="xref" href="dev-internal.html#ProcessText">ProcessText</a> after it determinesthat GD text is in use.If $draw_it is true, text is drawn;if $draw_it is false, only the bounding box size of the text is calculated andreturned as a two-element array ($width, $height).Here $width is measured along the X axis, and $height along Y, regardlessof the text angle. These are the size of an orthogonal bounding box thatcontains the text block.The $font argument is a PHPlot font array, which must reference a GD font.The $angle is 0 or 90 degrees, as GD text only supports those values.$x, $y are the reference point of the text $text, which is drawn in color$color.The text string can contain multiple lines, with a newline character betweenlines.The $h_factor and $v_factor arguments are translated from thealignment arguments supplied to DrawText or SizeText: 0, 0.5, or 1.0If $draw_it is false, for text sizing mode, the x, y, color,h_factor and v_factor arguments are ignored.</p><p>Note: This was added at PHPlot-5.0.5. It was changed at PHPlot-5.0.6 totake a single font array argument, rather than 3 separate arguments forfont number, width, and height.</p></dd><dt><span class="term"><a id="ProcessTextTTF"></a>ProcessTextTTF($draw_it, $font, $angle, $x, $y, $color, $text, $h_factor, $v_factor)</span></dt><dd><p>Draws TTF text, or calculates the size of TTF text.This is only called by <a class="xref" href="dev-internal.html#ProcessText">ProcessText</a> after it determinesthat TTF text is in use.If $draw_it is true, text is drawn;if $draw_it is false, only the bounding box size of the text is calculated andreturned as a two-element array ($width, $height).Here $width is measured along the X axis, and $height along Y, regardlessof the text angle. These are the size of an orthogonal bounding box thatcontains the text block.The $font argument is a PHPlot font array, which must reference a TTF font.The text is drawn at $angle degrees; unlike GD text TTF text can be drawnat any angle.$x, $y are the reference point of the text $text, which is drawn in color$color.The text string can contain multiple lines, with a newline character betweenlines.The $h_factor and $v_factor arguments are translated from thealignment arguments supplied to DrawText or SizeText: 0, 0.5, or 1.0If $draw_it is false, for text sizing mode, the x, y, color,h_factor and v_factor arguments are ignored.</p><p>Note that the interpretation of the alignment for text at arbitrary anglesmay not be what you expect. Rotation of text happens before alignment, andalignment and positioning use the orthogonal bounding box of the text.</p><p>Note: This was added at PHPlot-5.0.5. It was changed in PHPlot-5.0.6 totake a single font array argument, rather than 2 separate arguments forfont filename and size.</p></dd><dt><span class="term"><a id="SetBgColorIndexes"></a>SetBgColorIndexes()</span></dt><dd><p>Allocates the colors for the image background and image border.Called by <a class="xref" href="dev-internal.html#SetColorIndexes">SetColorIndexes</a> before drawing anything, andby <a class="xref" href="DrawMessage.html" title="DrawMessage"><span class="refentrytitle">DrawMessage</span></a> if needed.This was added in PHPlot-5.7.0 by moving code from SetColorIndexes, so thatDrawMessage can set up only the color indexes it needs.</p></dd><dt><span class="term"><a id="SetColorIndexes"></a>SetColorIndexes()</span></dt><dd><p>Allocates all the colors needed for a plot.Called by <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> before drawing anything.Calls <a class="xref" href="dev-internal.html#SetBgColorIndexes">SetBgColorIndexes</a> (starting at PHPlot-5.7.0) to setthe background and border color indexes.This was added in PHPlot-5.2.0.</p></dd><dt><span class="term"><a id="SetDashedStyle"></a>SetDashedStyle($which_ndxcol, $use_style = TRUE)</span></dt><dd><p>Sets the GD line style to select a dashed line, if line styles are enabled,in preparation for drawing a dashed line. $which_ndxcol is the color indexto use for the line, and $use_style is a flag indicating if a styled lineis to be drawn. Returns a GD color index to use for drawing. If$use_styles is false, indicating solid lines, the return value is$which_ndxcol. If $use_styles is true or omitted, the return value is aGD constant used to indicate drawing a styled line, and $which_ndxcol isused to set up the line style. The return value is then used by the calleras the color argument in drawing functions such as<code class="function">imageline</code>.</p><p>To understand how this function works, see the documentation for the PHP GDfunction <code class="function">ImageSetStyle()</code> and also refer to <a class="xref" href="SetDefaultDashedStyle.html" title="SetDefaultDashedStyle"><span class="refentrytitle">SetDefaultDashedStyle</span></a>. GD expects a line style to be specifiedas an array of pixel values, which is awkward to deal with. PHPlot uses ashorthand notation with integer values indicating pairs of the number ofcolor pixels ("on" pixels), then transparent pixels ("off" pixels).<code class="function">SetDefaultDashedStyle()</code> creates a template string witha marker for each "on" pixel, and the special GD color code for transparentpixels for each "off" pixel. This template is saved in the class variable<code class="varname">default_dashed_style</code>. The actual color to use for the"on" pixels is filled in by <code class="function">SetDashedStyle()</code> beforethe dashed style is used. The result is an array of pixel values for<code class="function">ImageSetStyle()</code>.</p><p>(In PHPlot-6.1.0 and earlier, <code class="function">SetDefaultDashedStyle()</code>created a string of PHP code to generate an array of pixel values in theform used by the GD function <code class="function">ImageSetStyle()</code>, andsaved this as <code class="varname">default_dashed_style</code>.<code class="function">SetDashedStyle()</code> then evaluated the PHP code, withthe correct color filled in from <code class="varname">$which_ndxcol</code>.)</p><p>Called by all functions that need to draw lines that can have a line styleapplied, including <a class="xref" href="dev-internal.html#DrawXTicks">DrawXTicks</a> and <a class="xref" href="dev-internal.html#DrawYTicks">DrawYTicks</a>(for drawing the grid lines, not the ticks), and <a class="xref" href="dev-internal.html#DrawLines">DrawLines</a>for drawing line plots.</p><p>The $use_style argument and return value were added in PHPlot-6.0.0.Before that, <code class="function">SetDashedStyle</code> unconditionally set up theline style, and returned a boolean value.</p></dd><dt><span class="term"><a id="SetDefaultFonts"></a>SetDefaultFonts()</span></dt><dd><p>Selects all the default font values and sizes. See <a class="xref" href="SetFont.html" title="SetFont"><span class="refentrytitle">SetFont</span></a>for details of the font element names and default values. Called by the classconstructor initialization function <a class="xref" href="dev-internal.html#initialize">initialize</a> to initializefonts in the plot object, and by <a class="xref" href="SetUseTTF.html" title="SetUseTTF"><span class="refentrytitle">SetUseTTF</span></a> to restore thedefaults when changing from or to TrueType font usage.</p></dd><dt><span class="term"><a id="SetDefaultStyles"></a>SetDefaultStyles()</span></dt><dd><p>Initializes default colors and styles for PHPlot objects. Mostly this callsthe public member functions such as <a class="xref" href="SetDataColors.html" title="SetDataColors"><span class="refentrytitle">SetDataColors</span></a> butwithout specifying an array of colors, which causes the member functionsto select default values.Called by the class constructor initialization function<a class="xref" href="dev-internal.html#initialize">initialize</a>.</p></dd><dt><span class="term"><a id="SetIndexColor"></a>SetIndexColor($which_color, $alpha = 0)</span></dt><dd><p>This function was removed in PHPlot-5.2.0.It parsed a color specification, and allocated a GD color index.The first part is replaced by calling <a class="xref" href="dev-internal.html#SetRGBColor">SetRGBColor</a> directly,and the second part is implemented with <a class="xref" href="dev-internal.html#GetColorIndex">GetColorIndex</a>at graph drawing time.</p></dd><dt><span class="term"><a id="SetIndexDarkColor"></a>SetIndexDarkColor($which_color, $alpha = 0)</span></dt><dd><p>This function was removed in PHPlot-5.2.0.It parsed a color specification, and allocated a GD color index for aslightly darker shade of the color.The first part is replaced by calling <a class="xref" href="dev-internal.html#SetRGBColor">SetRGBColor</a> directly,and the second part is implemented with <a class="xref" href="dev-internal.html#GetDarkColorIndex">GetDarkColorIndex</a>at graph drawing time.</p></dd><dt><span class="term"><a id="SetInputFile"></a>SetInputFile($which_input_file)</span></dt><dd><p>Sets an image file $which_input_file to be used as the background image forthe graph. Also resets the graph size to the size of the image file.Called by the class constructor initialization function<a class="xref" href="dev-internal.html#initialize">initialize</a>.Note: In earlier releases, this was considered an externally availablefunction. After a PHPlot object was created with the constructor,SetInputFile could be used to resize it and set the background image.Although this still works, it is deprecated. SetInputFile should beconsidered an internal-use-only function. Users should set the backgroundimage file using the 4th argument of <a class="xref" href="PHPlot.html" title="PHPlot"><span class="refentrytitle">PHPlot</span></a> or<a class="xref" href="PHPlot-truecolor.html" title="PHPlot_truecolor"><span class="refentrytitle">PHPlot_truecolor</span></a> when creating an instance of the object.</p></dd><dt><span class="term"><a id="SetLabelType"></a>SetLabelType($mode, $args)</span></dt><dd><p>Sets the formatting used for tick, data, and pie chart labels.This implements <a class="xref" href="SetXLabelType.html" title="SetXLabelType"><span class="refentrytitle">SetXLabelType</span></a>,<a class="xref" href="SetYLabelType.html" title="SetYLabelType"><span class="refentrytitle">SetYLabelType</span></a>, <a class="xref" href="SetXDataLabelType.html" title="SetXDataLabelType"><span class="refentrytitle">SetXDataLabelType</span></a>,<a class="xref" href="SetYDataLabelType.html" title="SetYDataLabelType"><span class="refentrytitle">SetYDataLabelType</span></a>, and part of<a class="xref" href="SetPieLabelType.html" title="SetPieLabelType"><span class="refentrytitle">SetPieLabelType</span></a>.$mode is either 'x', 'xd', 'y', 'yd', or 'p' to select the type of label(x, y for tick labels; xd, yd for data labels; p for pie chart labels).$args is an array of arguments, with $args[0] selecting the type offormatting (for example, <code class="literal">data</code>).Additional array elements depend on the formatting type.For more details, see the above-referenced functions.All arguments to those functions are combined into an array and passed to<code class="function">SetLabelType</code> as $args.Separation of data and tick label formatting was available starting withPHPlot-5.1.0. Support for pie chart label formatting was added in PHPlot-5.6.0.</p></dd><dt><span class="term"><a id="SetRGBColor"></a>SetRGBColor($color_asked, $alpha = 0)</span></dt><dd><p>Converts a general color specification into a standard form as an array of4 components: red, green, blue, and alpha, and returns the array. The 3color components are integers in the range 0-255, and the alpha componentis an integer in the range 0-127 (where 0 means opaque). The acceptablecolor specification forms are documented in <a class="xref" href="conc-colors.html#conc-colors-forms" title="3.5.1. Color Parameter Forms">Section 3.5.1, “Color Parameter Forms”</a>and <a class="xref" href="adv-truecolor.html#adv-truecolor-forms" title="4.3.4. Color Parameter Form Extensions">Section 4.3.4, “Color Parameter Form Extensions”</a>,and include color names, component arrays, and strings of the form #RRGGBBand #RRGGBBAA. The alpha argument provides a default value if the colorspecification does not include alpha; the default 0 makes the coloropaque.This is used directly by all functions that accept a color specification.Use of alpha in the color specification, the default alpha argument, and the4th component in the returned array were added in PHPlot-5.1.1.</p></dd><dt><span class="term"><a id="SetupAreaPlot"></a>SetupAreaPlot($stacked, &$xd, &$yd)</span></dt><dd><p>Sets up for an area plot (plot types <code class="literal">area</code>,<code class="literal">stackedarea</code>, <code class="literal">squaredarea</code>,and <code class="literal">stackedsquaredarea</code>).$stacked indicates a stacked (cumulative) plot, so theY values in the data array are to be accumulated for each X row.</p><p>This function calculates two arrays, $xd[] and $yd[], which are used fordrawing area fills. On return, $xd[] contains the device coordinates forthe X values from the data array (or implied, for text-data data type).$yd[] is returned as a 2-dimensional array of Y values in device coordinates.<code class="function">SetupAreaPlot</code> adds an additional column of Y valuesrepresenting the X axis, which is the base line for area fills.For stacked plots, this goes before the first real Y value in the array.For unstacked plots, it goes after the last real Y value in the array.</p><p>While traversing the data array, this function also draws axis data labelsif they are enabled. (Doing it here avoids having the calling functionsneed to access the data array at all.)</p><p>This was added in PHPlot-6.2.0.</p></dd><dt><span class="term"><a id="SizeText"></a>SizeText($font, $angle, $text)</span></dt><dd><p>Calculates the size of a block of text. It works on both GD (fixed-font) and TTFtext.$font is a text element name, empty, or a PHPlot font array (use of an arrayis deprecated); see <a class="xref" href="dev-internal.html#DrawText">DrawText</a> for details.$angle is the text angle in degrees.$text is the text string. The text string can contain multiple lines,with a newline character between lines.This function just calls <a class="xref" href="dev-internal.html#ProcessText">ProcessText</a> in text sizing modeto do the work.It returns a two-element array with the text width and height. These are thewidth and height of an orthogonal bounding box (box aligned with the Xand Y axes) which contains the rotated text block.Called by functions which need to determine text size for laying outplot elements, such as <a class="xref" href="dev-internal.html#CalcMargins">CalcMargins</a>.This function replaced <a class="xref" href="dev-internal.html#TTFBBoxSize">TTFBBoxSize</a> at PHPlot-5.0.5.</p></dd><dt><span class="term"><a id="tile_img"></a>tile_img($file, $xorig, $yorig, $width, $height, $mode)</span></dt><dd><p>Tiles an image from a file onto the plot image.$file is the filename of the image to use as the tile.($xorig, $yorig) are the origin point for the tiling,and ($width, $height) are the area to be tiled. These are used to tile justunder the plot area versus the entire image. The $mode can be<code class="literal">centeredtile</code>, <code class="literal">tile</code>, or<code class="literal">scale</code>. Scale mode scales the source image tofit the target area. Tile and centeredtile modes repeat the source image asneeded to fit into the target area; the difference is that centeredtileoffsets the tile start position by half its size, which works better forsome tiles.Called by<a class="xref" href="dev-internal.html#DrawBackground">DrawBackground</a> and <a class="xref" href="dev-internal.html#DrawPlotAreaBackground">DrawPlotAreaBackground</a>if an image file is selected for the plot area or overall background.</p></dd><dt><span class="term"><a id="truncate_array"></a>truncate_array(&$array, $size)</span></dt><dd><p>This was added in PHPlot-5.2.0 and removed in PHPlot-5.3.1,when data color processing was changed to not truncate the color arrays.</p></dd><dt><span class="term"><a id="TTFBBoxSize"></a>TTFBBoxSize($size, $angle, $font, $string)</span></dt><dd><p>This function was removed at PHPlot-5.0.5.It was replaced by <a class="xref" href="dev-internal.html#SizeText">SizeText</a>.</p></dd><dt><span class="term"><a id="TuneAutoRange"></a>TuneAutoRange($which, $zero_magnet, $adjust_mode, $adjust_amount)</span></dt><dd><p>This implements <a class="xref" href="TuneXAutoRange.html" title="TuneXAutoRange"><span class="refentrytitle">TuneXAutoRange</span></a> and<a class="xref" href="TuneYAutoRange.html" title="TuneYAutoRange"><span class="refentrytitle">TuneYAutoRange</span></a> to store tuning parameters used by theautomatic range calculation. $which is 'x' or 'y', and the other argumentsare as described under those two public functions.This was added in PHPlot-6.0.0</p></dd><dt><span class="term"><a id="TuneAutoTicks"></a>TuneAutoTicks($which, $min_ticks, $tick_mode, $tick_inc_integer)</span></dt><dd><p>This implements <a class="xref" href="TuneXAutoTicks.html" title="TuneXAutoTicks"><span class="refentrytitle">TuneXAutoTicks</span></a> and<a class="xref" href="TuneYAutoTicks.html" title="TuneYAutoTicks"><span class="refentrytitle">TuneYAutoTicks</span></a> to store tuning parameters used by thetick increment calculation. $which is 'x' or 'y', and the other argumentsare as described under those two public functions.This was added in PHPlot-6.0.0</p></dd><dt><span class="term"><a id="xtr"></a>xtr($x_world)</span></dt><dd><p>Translates an X world coordinate value into a pixel coordinate value.This uses the scale and translation set up by <a class="xref" href="dev-internal.html#CalcTranslation">CalcTranslation</a>.See <a class="xref" href="GetDeviceXY.html" title="GetDeviceXY"><span class="refentrytitle">GetDeviceXY</span></a> for a public interface.</p></dd><dt><span class="term"><a id="ytr"></a>ytr($y_world)</span></dt><dd><p>Translates a Y world coordinate value into a pixel coordinate value.This uses the scale and translation set up by <a class="xref" href="dev-internal.html#CalcTranslation">CalcTranslation</a>.See <a class="xref" href="GetDeviceXY.html" title="GetDeviceXY"><span class="refentrytitle">GetDeviceXY</span></a> for a public interface.</p></dd><dt><span class="term"><a id="__sleep"></a>__sleep()</span></dt><dd><p>This is a PHP "magic method" that prepares a PHPlot object for serialization.It stores the PHPlot version string (for checking at wakeup time), and aflag indicating if it used a truecolor image or not.See <a class="xref" href="adv-serialize.html" title="4.2. PHPlot Object Serialization">Section 4.2, “PHPlot Object Serialization”</a>.This was added in PHPlot-5.8.0.</p></dd><dt><span class="term"><a id="__wakeup"></a>__wakeup()</span></dt><dd><p>This is a PHP "magic method" that re-creates a PHPlot object afterunserialization.It checks the stored version string to make sure the object was serialized withthe exact same PHPlot version, and then re-creates the image resource.See <a class="xref" href="adv-serialize.html" title="4.2. PHPlot Object Serialization">Section 4.2, “PHPlot Object Serialization”</a>.This was added in PHPlot-5.8.0.</p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="dev-legend.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="part3.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="dev-vars.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 8. PHPlot Legend Layout </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 10. PHPlot Class Member Variables</td></tr></table></div></body></html>