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>3.6. Labels</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="concepts.html" title="Chapter 3. PHPlot Concepts" /><link rel="prev" href="conc-colors.html" title="3.5. Colors" /><link rel="next" href="conc-otherelements.html" title="3.7. Other Plot Elements" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.6. Labels</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="conc-colors.html">Prev</a> </td><th width="60%" align="center">Chapter 3. PHPlot Concepts</th><td width="20%" align="right"> <a accesskey="n" href="conc-otherelements.html">Next</a></td></tr></table><hr /></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="conc-labels"></a>3.6. Labels</h2></div></div></div><div class="abstract"><p class="title"><strong></strong></p><p>This section contains information about creating labels which identify datavalues on the plot.For a list of functions used to control labels,see <a class="xref" href="ref-labels.html" title="6.11. Labels">Section 6.11, “Labels”</a>.</p></div><p>Several types of labels are available in PHPlot:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Tick labels identify the values at the tick positions.There are X tick labels and Y tick labels.</p></li><li class="listitem"><p>Axis data labels display the label values from your data array.X axis data labels are available for vertical plots, andY axis data labels are available for horizontal plots.</p></li><li class="listitem"><p>Data value labels display the actual value of a data point.These are available only for some plot types.Y data value labels are available for vertical plots, andX data value labels are available for horizontal plots.</p></li><li class="listitem"><p>Pie chart data labels identify the pie segments. By default, they show thepercentage of each pie segment.</p></li></ul></div><p></p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The term <span class="emphasis"><em>data label</em></span> is often used to refer to both axisdata labels and data value labels. The same PHPlot functions are usedto configure axis data labels and data value labels.</p></div><p>Here is a sample plot with the Y tick labels and X axis data labels called out.</p><div class="informalfigure"><div class="mediaobject"><img src="images/labels.png" alt="Tick labels and Data labels on a plot" /></div></div><p></p><p>Here is a sample plot with the pie chart labels called out.</p><div class="informalfigure"><div class="mediaobject"><img src="images/labels-pie.png" alt="Pie chart data labels" /></div></div><p></p><p>Here is a sample vertical bar plot with the Y tick labels,Y data value labels, and X axis data labels called out.</p><div class="informalfigure"><div class="mediaobject"><img src="images/labels-bar.png" alt="Tick labels, Data labels, and Data Value labels on a plot" /></div></div><p></p><p>Here is a sample horizontal bar plot with the Y (axis) data labels,X data value labels, and X tick labels called out.</p><div class="informalfigure"><div class="mediaobject"><img src="images/labels-horizbar.png" alt="Tick labels, Data labels, and Data Value labels on a plot" /></div></div><p></p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="conc-labels-tick"></a>3.6.1. Tick Labels</h3></div></div></div><p>Tick labels identify the X or Y values at tick positions (even if the tickmarks themselves are not drawn).See <a class="xref" href="conc-otherelements.html#conc-ticks" title="3.7.4. Tick Marks">Section 3.7.4, “Tick Marks”</a> for information about the tick positions.</p><p>Note that even with data type 'data-data', where explicit independentvariable values for the data are supplied, the tick positions and labelsalong that axis are still calculated automatically (unless modified by theavailable functions).For example, for vertical plots, your supplied X values in thedata array are not used for the X tick labels.</p><p>You can enable, disable, or position the tick labels with<a class="xref" href="SetXTickLabelPos.html" title="SetXTickLabelPos"><span class="refentrytitle">SetXTickLabelPos</span></a> and <a class="xref" href="SetYTickLabelPos.html" title="SetYTickLabelPos"><span class="refentrytitle">SetYTickLabelPos</span></a>.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="conc-labels-data"></a>3.6.2. Axis Data Labels</h3></div></div></div><p>Axis data labels are available for the independent variable axis. This is Xfor vertical plots, and Y for horizontal plots.These data labels are supplied in your data array for each data point.For example, with data type text-data :</p><pre class="programlisting">$data = array( array('Peaches',100),array('Apples', 140),array('Pears', 90));</pre><p>The three points have data labels 'Peaches', 'Apples', and 'Pears'.For vertical plots, these data labels will be drawn at the bottom of the plot(by default) below the corresponding X values.For horizontal plots, these data labels will be drawn to the left of the plot(by default), to the left of the corresponding Y values.You can disable or reposition the data labels with<a class="xref" href="SetXDataLabelPos.html" title="SetXDataLabelPos"><span class="refentrytitle">SetXDataLabelPos</span></a> and<a class="xref" href="SetYDataLabelPos.html" title="SetYDataLabelPos"><span class="refentrytitle">SetYDataLabelPos</span></a>.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The axis data labels are not necessarily drawn along axis lines. They areusually drawn along the bottom (for X) or left side (for Y) of the plot.Although these are also the usual positions for the X axis and Y axis, theactual axis lines may be drawn elsewhere.See <a class="xref" href="SetXAxisPosition.html" title="SetXAxisPosition"><span class="refentrytitle">SetXAxisPosition</span></a> or <a class="xref" href="SetYAxisPosition.html" title="SetYAxisPosition"><span class="refentrytitle">SetYAxisPosition</span></a>for more information on axis positions.</p></div><p>You will generally not want both tick labels and axis data labels on,because they will overlap and be unreadable. If you are not using datalabels, you should either make them all empty strings in your data array,or else use <a class="xref" href="SetXDataLabelPos.html" title="SetXDataLabelPos"><span class="refentrytitle">SetXDataLabelPos</span></a>('none') (for vertical plots)or <a class="xref" href="SetYDataLabelPos.html" title="SetYDataLabelPos"><span class="refentrytitle">SetYDataLabelPos</span></a>('none') (for horizontal plots)to turn them off.You can also call <a class="xref" href="SetXTickLabelPos.html" title="SetXTickLabelPos"><span class="refentrytitle">SetXTickLabelPos</span></a> (for vertical plots)or <a class="xref" href="SetYTickLabelPos.html" title="SetYTickLabelPos"><span class="refentrytitle">SetYTickLabelPos</span></a> (for horizontal plots)to explicitly position the tick labels.PHPlot will then disable the data labels.</p><p>If you don't tell PHPlot what to do with data and tick labels,the behavior depends on the PHPlot version.PHPlot 5.1.0 and later will examine your data array to see if there are anynon-empty data labels, and if so it will draw only data labels, and omittick labels.If all of the labels in your data array are empty, tick labels will be drawn.(PHPlot through 5.0.7 will draw both tick and data labels in these cases.)</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="conc-labels-datavalue"></a>3.6.3. Data Value Labels</h3></div></div></div><p>Data value labels are available only for some plot types.These are displayed inside the plot, and show the value ateach data point, bar, or bar segment.</p><p>For vertical bar charts, Y data value labels indicate the Y value for eachbar, and are drawn above the bar for positive values, or below the bar fornegative values.For vertical stackedbar charts, Y data value labels indicate the total Yvalue for each stack, and optionally indicate the value of each segment.Use <a class="xref" href="SetYDataLabelPos.html" title="SetYDataLabelPos"><span class="refentrytitle">SetYDataLabelPos</span></a> to enable Y data value labels.</p><p>For horizontal bar charts, X data value labels indicate the X value for eachbar, and are drawn to the left or right of the end of the bar.For horizontal stackedbar charts, X data value labels indicate the total Xvalue for each stack, and optionally indicate the value of each segment.Use <a class="xref" href="SetXDataLabelPos.html" title="SetXDataLabelPos"><span class="refentrytitle">SetXDataLabelPos</span></a> to enable X data value labels.</p><p>Y data value labels are also available for vertical plots of typeslines, linepoints, points, and squared (starting in PHPlot-5.3.0).X data value labels are available for horizontal plots of typeslines, linepoints, and points (starting in PHPlot-6.0.0).The data value labels indicate the value of each point and are displayed(by default) above each point.Use <a class="xref" href="SetYDataLabelPos.html" title="SetYDataLabelPos"><span class="refentrytitle">SetYDataLabelPos</span></a> to enable Y data value labels forthese vertical plots, and <a class="xref" href="SetXDataLabelPos.html" title="SetXDataLabelPos"><span class="refentrytitle">SetXDataLabelPos</span></a> to enable Xdata value labels for these horizontal plots.PHPlot does not attempt to prevent interference between the labels andother plot elements.To change the position of the labels, see <a class="xref" href="adv-tuning.html#adv-tuning-labels" title="4.7.7. Tuning Labels">Section 4.7.7, “Tuning Labels”</a>.</p><p>Data value labels are not available with other plot types.</p><p></p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The same function is used to position X axis data labels and X data valuelabels, and the same function is used to position Y axis data labels and Y datavalue labels. There is no ambiguity, because one type of label is availablefor each axis for vertical plots, and the other type for horizontal plots.</p></div><p></p><p><a class="xref" href="ex-bars4.html#example-bars4" title="Example 5.19. Bar Chart with Data Value Labels">Example 5.19, “Bar Chart with Data Value Labels”</a> shows a vertical bar chartwith Y data value labels.<a class="xref" href="ex-stackedbars3.html#example-stackedbars3" title="Example 5.20. Stacked Bars with Y Data Value Labels">Example 5.20, “Stacked Bars with Y Data Value Labels”</a> shows a vertical stacked bar chartwith Y data value labels.<a class="xref" href="ex-linepoints2.html#example-linepoints2" title="Example 5.33. Linepoints Plot with Data Value Labels">Example 5.33, “Linepoints Plot with Data Value Labels”</a> shows a linepoints plotwith Y data value labels.</p><p><a class="xref" href="ex-horizbar.html#example-horizbar" title="Example 5.27. Horizontal Bar Chart">Example 5.27, “Horizontal Bar Chart”</a> shows a horizontal bar chartwith X data value labels.<a class="xref" href="ex-horizstackedbar.html#example-horizstackedbar" title="Example 5.28. Horizontal Stacked Bar Chart">Example 5.28, “Horizontal Stacked Bar Chart”</a> shows a horizontal stacked bar chartwith X data value labels.<a class="xref" href="ex-horizlinepts.html#example-horizlinepts" title="Example 5.48. Horizontal Linepoints Plot with Data Value Labels and Lines">Example 5.48, “Horizontal Linepoints Plot with Data Value Labels and Lines”</a> shows a horizontal linepoints plotwith X data value labels.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="conc-labels-pie"></a>3.6.4. Pie Chart Labels</h3></div></div></div><p>Pie chart labels identify segments on a pie chart. By default, theseshow the percentage of each segment, relative to the whole pie. Startingwith PHPlot-5.6.0, pie chart labels can display other information, and canbe flexibly formatted.</p><p>Use <a class="xref" href="SetPieLabelType.html" title="SetPieLabelType"><span class="refentrytitle">SetPieLabelType</span></a> to select the source for pie labelsas well as how to format them.<a class="xref" href="ex-pielabeltype.html#example-pielabeltype" title="Example 5.41. Pie Chart Label Types">Example 5.41, “Pie Chart Label Types”</a> shows a pie chart with differentlabeling options.</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="conc-labels-format"></a>3.6.5. Formatting Labels</h3></div></div></div><p>Tick labels, data labels, and pie chart labels are subject to format controls.There are several choices in formatting. By default, the label value itselfis simply displayed.Use <a class="xref" href="SetXLabelType.html" title="SetXLabelType"><span class="refentrytitle">SetXLabelType</span></a> and <a class="xref" href="SetYLabelType.html" title="SetYLabelType"><span class="refentrytitle">SetYLabelType</span></a> toselect one of the other format types for tick labels.Use <a class="xref" href="SetXDataLabelType.html" title="SetXDataLabelType"><span class="refentrytitle">SetXDataLabelType</span></a> and<a class="xref" href="SetYDataLabelType.html" title="SetYDataLabelType"><span class="refentrytitle">SetYDataLabelType</span></a> to select one of the other formattypes for data labels (both axis data labels and data value labels).(Note that SetXLabelType also sets the default format for X data labels,for use if SetXDataLabelType is not called.Also SetYLabelType sets the default for Y data labels, for use ifSetYDataLabelType is not called.)Use <a class="xref" href="SetPieLabelType.html" title="SetPieLabelType"><span class="refentrytitle">SetPieLabelType</span></a> to select a format type for pie chartlabels.</p><p>The following sections contain details of the available formatting types.More examples can be found in the reference page for<a class="xref" href="SetXLabelType.html" title="SetXLabelType"><span class="refentrytitle">SetXLabelType</span></a>.</p><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="conc-labels-format-data"></a>3.6.5.1. Formatting Labels: 'data' type</h4></div></div></div><p>Label format type 'data' expects the tick label, data label, or pie labelvalues to be numbers, and formats the values as floating point numbers witha separator between every group of thousands and a fixed number of decimalplaces. You can set the number of digits of precision, with the defaultbeing 1 digit. You can also set a prefix and/or suffix string (such as acurrency symbol or percent sign).PHPlot will try to set the thousands grouping separator anddecimal separator according to your locale, but this can be overridden ifnecessary.</p><p>For example:</p><pre class="programlisting">$plot->SetYLabelType('data', 2, '$');</pre><p>This might format the value 1234.567 as "$1,234.57" (depending on locale).</p></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="conc-labels-format-time"></a>3.6.5.2. Formatting Labels: 'time' type</h4></div></div></div><p>Label format type 'time' expects the tick or data label values to be a PHP timevalue (number of seconds since a fixed base data, the Unix Epoch).PHPlot will format the labels according to the format string you provide.Refer to the PHP documentation for <code class="function">strftime()</code> fordetails on the format string.</p><p>For example:</p><pre class="programlisting">$plot->SetXLabelType('time', $format);</pre><p>If a label value is the numeric equivalent of "31 December 2004 at 1:23:45 pm"(which is 1104517425 on some platforms), the following table shows someexamples of the result with different values of $format:</p><div class="informaltable"><table summary="Date/time format examples" border="1"><colgroup><col class="c1" /><col class="c2" /></colgroup><thead><tr><th>$format:</th><th>Result:</th></tr></thead><tbody><tr><td>%Y-%m-%d</td><td>2004-12-31</td></tr><tr><td>%b %Y</td><td>Dec 2004</td></tr><tr><td>%b %d, %Y</td><td>Dec 31, 2004</td></tr><tr><td>%d %b</td><td>31 Dec</td></tr><tr><td>%H:%M:%S</td><td>13:23:45</td></tr></tbody></table></div><p>(This formatting type is generally not applicable to pie chart labels.)</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>If you select 'time' formatting, but don't set a time format string,PHPlot-5.0rc3 and higher will format the values as hours, minutes, andseconds as shown in the last row of the table above.(The default format was undefined before version 5.0rc3.)</p><p>Also note that there are limits to the range of this type of formattingthat can make it unusable for historical data. On some platforms, datesbefore 1970-01-01 can not be formatted.</p><p>Starting with PHPlot-5.0.4, empty string values for data labels areignored for 'time' and 'data' formatting. Earlier versions would formatthe labels as 0 (for 'data') or cause an error (for 'time').</p></div><p>While date/time formatting can be useful, for X values it may beeasier to just format the label values in your PHP code and put the resultinto the label positions in the data array. If you need date/time formatting forY values (and it is hard to imagine where that would be useful), you haveno option but to use the 'time' format labels for tick values.</p></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="conc-labels-format-printf"></a>3.6.5.3. Formatting Labels: 'printf' type</h4></div></div></div><p>Label format type 'printf' expects one, two, or three additionalarguments specifying <code class="function">printf</code> format strings,and formats the label value according to the format string(s).If a single format string is given, it is used for the label values.The format string must contain exactly one conversion specification(%-code) which consumes a single argument.For example:</p><pre class="programlisting">$plot->SetYLabelType('printf', '%8.2e parsecs');</pre><p>This might produce a label like " 1.23e+8 parsecs".</p><p>If two format strings are provided, the first is used to format the valueof the label if it is greater than or equal to zero. The second formatstring is used to format the absolute value of the label if the label valueis less than zero.</p><p>If three format strings are provided, the first is used to format the valueof the label if it is greater than zero. The second format string is used toformat the absolute value of the label if the label value is less than zero.The third is used to format the value of the label if it is zero. In someapplications, it may be appropriate to use an empty string as the thirdformat string, which will suppress the display of labels with a value of zero.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Support for using two or three 'printf' format strings was addedin PHPlot-6.2.0.When using 2 or 3 'printf' format strings, the labels being formatted mustbe numeric values.</p></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="conc-labels-format-custom"></a>3.6.5.4. Formatting Labels: 'custom' type</h4></div></div></div><p>A user-defined function can be provided to format labels. Specifyformatting type 'custom', and provide the name of your function asa string. (This is actually a PHP <span class="emphasis"><em>callback</em></span> typeargument, which can also be an array containing an object and a methodname. See the PHP documentation on callbacks for more details.)You can provide an additional argument which will be passedto your function when formatting labels (a<span class="emphasis"><em>pass-through</em></span> argument).</p><p>In this example, the user-provided function is called<code class="function">my_formatter</code>, and you want an additional argument $datapassed to the function.</p><pre class="programlisting">$plot->SetYLabelType('custom', 'my_formatter', $data);</pre><p></p><p>Your formatting function will accept 1 or 2 arguments (or more - see below).</p><pre class="programlisting">function my_formatter($label, $arg){...return $some_result;}</pre><p>The function will be called with $label set to the value of the label to beformatted, and is expected to return the formatted label text. $arg is apass-through argument that has whatever value you used with<code class="function">SetXLabelType</code> (etc.). In the above example, this is$data. You need to declare this second argument in your function only ifyou are using a pass-through argument.</p><p>You can also use PHP anonymous functions for custom label formatting.This avoids having to define a function elsewhere in your code, and keepsthe custom label formatting code near where it is being used.This is recommended only when the custom label formatting code is relativelyshort<a href="#ftn.idp1374419092" class="footnote" id="idp1374419092"><sup class="footnote">[3]</sup></a>.Anonymous functions can also take advantage of the PHP <code class="literal">use</code>clause to inherit variables from the parent scope.</p><p>Here is an example of a custom label formatting function that uses ananonymous function to offset the Y axis label by an amount in a localvariable.</p><pre class="programlisting">$offset = 10; // A local variable...$plot->SetYLabelType('custom', function ($y) use ($offset) {return ($y - $offset); } );</pre><p></p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>PHPlot may call your label formatting function multiple times for the samelabel, and your function must return the same value each time.Also, do not rely on the labels being formatted in any particular order.</p><p>A custom label formatting function will not be called at all if thelabel value is an empty string (<code class="literal">''</code>).This generally only applies to axis data labels (the label strings inyour data array), since others are numbers.This means you cannot use custom label formatting to replace an emptystring with something else. The custom label formatting functionwill be called if the label string is anything other than an emptystring, such as a string with single space.</p></div><p>Custom label formatting is extremely flexible. You can convert values intoanother format (for example, degrees, minutes, seconds), or look up valuesin an external array (see <a class="xref" href="ex-bubbles1.html" title="5.40. Example - Bubbles Plot">Section 5.40, “Example - Bubbles Plot”</a>), for example.However, using this method, you can only selectively format or display labelsbased on their value. For even more control, use the additional argumentsprovided to the formatting function which are described in the next section.</p></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="conc-labels-format-custom2"></a>3.6.5.5. Formatting Labels: Extended 'custom' type</h4></div></div></div><p>When you use 'custom' formatting type, PHPlot actually provides 0, 1, or 2additional arguments to your callback. These identify the row, or row andcolumn, of the data point being labeled. You can use these extra argumentsin your callback for selective formatting or filtering based on theposition of the point being plotted in your data array.</p><p>PHPlot provides the following additional arguments to a custom labelformatting callback (after the label value and pass-through arguments):</p><div class="informaltable"><table summary="Custom formatting callback arguments" border="1"><colgroup><col class="c1" /><col class="c2" /></colgroup><thead><tr><th>Label:</th><th>Arguments Provided:</th></tr></thead><tbody><tr><td>Tick Labels</td><td>(None)</td></tr><tr><td>Axis Data Labels</td><td>$row</td></tr><tr><td>Data Value Labels (other than stackedbars total labels)</td><td>$row, $column</td></tr><tr><td>stackedbars data value labels for bar totals</td><td>$row</td></tr></tbody></table></div><p></p><p>You need not declare these arguments unless you are using them, but if youdo declare them, it is safer to make them optional with default NULL.(If you are only using the custom callback function for one specific type oflabel, you can omit the defaults.)For example:</p><pre class="programlisting">function my_formatter($label, $arg, $row=NULL, $column=NULL){...return $some_result;}</pre><p></p><p>The <span class="emphasis"><em>row</em></span> argument value is an index starting with zerothat numbers the rows in your data array. This corresponds to the ordinalposition of the independent variable (X for vertical plots, Y forhorizontal plots). This is also the outer index of your data array.</p><p>The <span class="emphasis"><em>column</em></span> argument value is an index starting with zerothat numbers the data sets in each row. This corresponds to the ordinalposition of the dependent variable (Y for vertical plots, X forhorizontal plots). Note that this is not simply the inner index of yourdata array, because the data array rows also have labels, and (depending onthe data type) may contain other values.For example, given the data type <code class="literal">data-data</code> and this dataarray:</p><pre class="programlisting">$data = array(array('Jan', 1, 10, 11, 12),array('Feb', 2, 20, 21, 22),array('Mar', 3, 30, 31, 32),);</pre><p>When formatting a data value label for X=2, Y=22 (the 3rd data set inthe row labeled 'Feb'), PHPlot will call a custom label formatting functionlike this:</p><pre class="programlisting">my_formatter(22, $passthrough, 1, 2);</pre><p>That is, row=1 and column=2.</p><p>As described in <a class="xref" href="conc-labels.html#conc-labels-format-custom" title="3.6.5.4. Formatting Labels: 'custom' type">Section 3.6.5.4, “Formatting Labels: 'custom' type”</a>, your callbackfunction returns the value of the formatted label. You can return an emptystring to display no label. This can be used to display data value labelsfor only one data set, for example - just return an empty string if $columnis not equal to the index of the data set you want to label.</p><p>See <a class="xref" href="ex-dlexformat.html" title="5.43. Example - Custom Data Value Label Formatting">Section 5.43, “Example - Custom Data Value Label Formatting”</a> for an example.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>These additional row and column arguments are only availablestarting with PHPlot-5.8.0.</p></div></div></div><div class="footnotes"><br /><hr style="width:100; text-align:left;margin-left: 0" /><div id="ftn.idp1374419092" class="footnote"><p><a href="#idp1374419092" class="para"><sup class="para">[3] </sup></a>You can't do unit testing on an anonymousfunction.</p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="conc-colors.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="concepts.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="conc-otherelements.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.5. Colors </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 3.7. Other Plot Elements</td></tr></table></div></body></html>