98 |
- |
1 |
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
|
|
2 |
<!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">Part 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>
|
|
|
3 |
This figure illustrates the layout of the legend, as drawn by
|
|
|
4 |
<a class="xref" href="dev-internal.html#DrawLegend">DrawLegend</a>.
|
|
|
5 |
Two of six possible arrangements of the color boxes and text are shown.
|
|
|
6 |
See <a class="xref" href="SetLegendStyle.html" title="SetLegendStyle"><span class="refentrytitle">SetLegendStyle</span></a> for more information.
|
|
|
7 |
</p><p>
|
|
|
8 |
Through PHPlot-5.2.0, the width of the color boxes was always
|
|
|
9 |
<code class="varname">char_w</code>, the width of one character (or the width of the
|
|
|
10 |
upper case letter "E") in the legend text font.
|
|
|
11 |
Starting with PHPlot-5.3.0, this can be adjusted using a class variable.
|
|
|
12 |
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.
|
|
|
13 |
</p><p>
|
|
|
14 |
If point shapes are used in the legend instead of color boxes
|
|
|
15 |
(see <a class="xref" href="SetLegendUseShapes.html" title="SetLegendUseShapes"><span class="refentrytitle">SetLegendUseShapes</span></a>, added in PHPlot-5.4.0),
|
|
|
16 |
the same amount of space is still allocated, including width adjustment.
|
|
|
17 |
But the point shape itself is always drawn at the same size as in
|
|
|
18 |
the plot, regardless of the width adjustment factor. If the plot area has
|
|
|
19 |
a color background, the width adjustment will stretch the box in that color
|
|
|
20 |
which is drawn behind the point shape.
|
|
|
21 |
</p><p>
|
|
|
22 |
If line markers are used in the legend instead of color boxes (see
|
|
|
23 |
<a class="xref" href="SetLegendUseShapes.html" title="SetLegendUseShapes"><span class="refentrytitle">SetLegendUseShapes</span></a>, added in PHPlot-6.0.0 for line plots),
|
|
|
24 |
the width of the area reserved for color boxes is scaled by 4
|
|
|
25 |
(along with any 'tuning' adjustment).
|
|
|
26 |
This leaves enough room to draw a line segment that can be identified
|
|
|
27 |
visually by color and width.
|
|
|
28 |
</p><p>
|
|
|
29 |
</p><div class="informalfigure"><div class="mediaobject"><img src="images/legend-layout.png" alt="PHPlot legend layout figure" /></div></div><p>
|
|
|
30 |
</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>
|