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>SetMarginsPixels</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="reference.html" title="PHPlot Function Reference" /><link rel="prev" href="SetLineWidths.html" title="SetLineWidths" /><link rel="next" href="SetNumberFormat.html" title="SetNumberFormat" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetMarginsPixels</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetLineWidths.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetNumberFormat.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetMarginsPixels"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetMarginsPixels</span></h2><p>SetMarginsPixels — Set margins around the plot area</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->SetMarginsPixels([<span class="optional"><em class="parameter"><code>$lm</code></em></span>], [<span class="optional"><em class="parameter"><code>$rm</code></em></span>], [<span class="optional"><em class="parameter"><code>$tm</code></em></span>], [<span class="optional"><em class="parameter"><code>$bm</code></em></span>])</pre></div><div class="refsect1"><a id="idp1378385676"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">SetMarginsPixels</code> sets the size of the margins around
|
|
|
4 |
the plot area. By default, the margin sizes are automatically calculated
|
|
|
5 |
based on the space needed. Use SetMarginsPixels to override these
|
|
|
6 |
automatic calculations and set specific margin sizes. The four margins are
|
|
|
7 |
specified independently and in pixels.
|
|
|
8 |
</p></div><div class="refsect1"><a id="idp1378386924"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$lm</code></em></span></dt><dd><p>
|
|
|
9 |
Optional argument specifying the left margin, in pixels.
|
|
|
10 |
If omitted or NULL, the value is automatically calculated.
|
|
|
11 |
</p></dd><dt><span class="term"><em class="replaceable"><code>$rm</code></em></span></dt><dd><p>
|
|
|
12 |
Optional argument specifying the right margin, in pixels.
|
|
|
13 |
If omitted or NULL, the value is automatically calculated.
|
|
|
14 |
</p></dd><dt><span class="term"><em class="replaceable"><code>$tm</code></em></span></dt><dd><p>
|
|
|
15 |
Optional argument specifying the top margin, in pixels.
|
|
|
16 |
If omitted or NULL, the value is automatically calculated.
|
|
|
17 |
</p></dd><dt><span class="term"><em class="replaceable"><code>$bm</code></em></span></dt><dd><p>
|
|
|
18 |
Optional argument specifying the bottom margin, in pixels.
|
|
|
19 |
If omitted or NULL, the value is automatically calculated.
|
|
|
20 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1378391388"></a><h2>Notes</h2><p>
|
|
|
21 |
The plot area is equal to the image area minus the margins. By default, the
|
|
|
22 |
margins are automatically calculated based on
|
|
|
23 |
the space needed for items <span class="emphasis"><em>outside</em></span> the plot area. The
|
|
|
24 |
plot area is then whatever space remains. Calculation for most plot types
|
|
|
25 |
takes into account the main title, axis titles, tick or data labels, and tick
|
|
|
26 |
marks (but not the legend, if drawn). For pie charts, only the main title
|
|
|
27 |
size is used when calculating the needed margins.
|
|
|
28 |
Use SetMarginsPixels to override these automatic calculations and
|
|
|
29 |
control the margins.
|
|
|
30 |
</p><p>
|
|
|
31 |
The upper left corner of the plot area is at device coordinates
|
|
|
32 |
(Left_Margin, Top_Margin).
|
|
|
33 |
The lower right corner of the plot area is at device coordinates
|
|
|
34 |
(Image_Width - Right_Margin, Image_Height - Bottom_Margin).
|
|
|
35 |
</p><p>
|
|
|
36 |
SetMarginsPixels and <a class="xref" href="SetPlotAreaPixels.html" title="SetPlotAreaPixels"><span class="refentrytitle">SetPlotAreaPixels</span></a> perform the same
|
|
|
37 |
function with different semantics. It makes no sense to use both - only the
|
|
|
38 |
last one called will have an effect.
|
|
|
39 |
</p><p>
|
|
|
40 |
Trailing defaulted arguments can be omitted, but non-trailing defaulted
|
|
|
41 |
arguments must be specified as NULL. For example, to set the right margin
|
|
|
42 |
to 100 pixels, and let PHPlot calculate the other three margins, use:
|
|
|
43 |
</p><pre class="programlisting">$plot->SetMarginsPixels(NULL, 100);
|
|
|
44 |
</pre><p>
|
|
|
45 |
</p></div><div class="refsect1"><a id="idp1378394716"></a><h2>History</h2><p>
|
|
|
46 |
Through PHPlot-5.0.6, SetMarginsPixels required all 4 arguments be
|
|
|
47 |
specified and not be NULL. Starting with PHPlot-5.0.7, each margin can
|
|
|
48 |
either be specified or automatically calculated.
|
|
|
49 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetLineWidths.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="SetNumberFormat.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetLineWidths </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetNumberFormat</td></tr></table></div></body></html>
|