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 8. PHPlot Legend Layout</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-layout.html" title="Chapter 7. PHPlot Plot Layout" /><link rel="next" href="dev-internal.html" title="Chapter 9. PHPlot Class Internal Functions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. PHPlot Legend Layout</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="dev-layout.html">Prev</a> </td><th width="60%" align="center">P
art III. Developer's Guide to PHPlot</th><td width="20%" align="right"> <a accesskey="n" href="dev-internal.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="dev-legend"></a>Chapter 8. PHPlot Legend Layout</h2></div></div></div><p>
This figure illustrates the layout of the legend, as drawn by
<a class="xref" href="dev-internal.html#DrawLegend">DrawLegend</a>.
Two of six possible arrangements of the color boxes and text are shown.
See <a class="xref" href="SetLegendStyle.html" title="SetLegendStyle"><span class="refentrytitle">SetLegendStyle</span></a> for more information.
</p><p>
Through PHPlot-5.2.0, the width of the color boxes was always
<code class="varname">char_w</code>, the width of one character (or the width of the
upper case letter "E") in the legend text font.
Starting with PHPlot-5.3.0, this can be adjusted using a class variable.
See <a class="xref" href="adv-tuning.html#adv-tuning-legend" title="4.7.6. Tuning the Legend">Section 4.7.6, “Tuning the Legend”</a> for more.
</p><p>
If point shapes are used in the legend instead of color boxes
(see <a class="xref" href="SetLegendUseShapes.html" title="SetLegendUseShapes"><span class="refentrytitle">SetLegendUseShapes</span></a>, added in PHPlot-5.4.0),
the same amount of space is still allocated, including width adjustment.
But the point shape itself is always drawn at the same size as in
the plot, regardless of the width adjustment factor. If the plot area has
a color background, the width adjustment will stretch the box in that color
which is drawn behind the point shape.
</p><p>
If line markers are used in the legend instead of color boxes (see
<a class="xref" href="SetLegendUseShapes.html" title="SetLegendUseShapes"><span class="refentrytitle">SetLegendUseShapes</span></a>, added in PHPlot-6.0.0 for line plots),
the width of the area reserved for color boxes is scaled by 4
(along with any 'tuning' adjustment).
This leaves enough room to draw a line segment that can be identified
visually by color and width.
</p><p>
</p><div class="informalfigure"><div class="mediaobject"><img src="images/legend-layout.png" alt="PHPlot legend layout figure" /></div></div><p>
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="dev-layout.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-internal.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 7. PHPlot Plot Layout </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. PHPlot Class Internal Functions</td></tr></table></div></body></html>