Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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>SetDrawXAxis</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="SetDrawPlotAreaBackground.html" title="SetDrawPlotAreaBackground" /><link rel="next" href="SetDrawXDataLabelLines.html" title="SetDrawXDataLabelLines" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetDrawXAxis</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetDrawPlotAreaBackground.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetDrawXDataLabelLines.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetDrawXAxis"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetDrawXAxis</span></h2><p>SetDrawXAxis &#8212; Enable or disable drawing of the X axis line</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot-&gt;SetDrawXAxis(<em class="parameter"><code>$draw</code></em>)</pre></div><div class="refsect1"><a id="idp1377992092"></a><h2>Description</h2><p>
3
<code class="function">SetDrawXAxis</code> enables or disables drawing of the X axis
4
line. Disabling the X axis line should be necessary only in special
5
applications.
6
    </p></div><div class="refsect1"><a id="idp1377993172"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$draw</code></em></span></dt><dd><p>
7
True to draw the X axis line, False to not draw the X axis line.
8
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1377994700"></a><h2>Notes</h2><p>
9
By default, the X axis line is drawn.
10
    </p><p>
11
Disabling the X axis line does not disable associated plot elements, nor
12
change the plot margin calculation.  To produce a completely 'bare' plot,
13
you must turn off the grid, tick marks, tick labels, and data labels.  You
14
also need to turn off the plot area border, which defaults to left and
15
right sides.  Lastly, you might want to reduce the margins, since the
16
default minimum margin is 15 pixels on each side of the plot area, even if
17
there are no axis lines, labels, or titles.  Here is an example:
18
</p><pre class="programlisting">// 'Bare' plot partial code example
19
$plot-&gt;SetXTickPos('none');          // Turn off X tick marks
20
$plot-&gt;SetXTickLabelPos('none');     // Turn off X tick labels
21
$plot-&gt;SetXDataLabelPos('none');     // Turn off X data labels
22
$plot-&gt;SetYTickPos('none');          // Turn off Y tick marks
23
$plot-&gt;SetYTickLabelPos('none');     // Turn off Y tick labels
24
$plot-&gt;SetPlotBorderType('none');    // Turn off plot area border
25
$plot-&gt;SetDrawXGrid(False);          // Turn off X grid lines
26
$plot-&gt;SetDrawYGrid(False);          // Turn off Y grid lines
27
$plot-&gt;SetDrawXAxis(False);          // Don't draw X axis line
28
$plot-&gt;SetDrawYAxis(False);          // Don't draw Y axis line
29
$plot-&gt;SetMarginsPixels(2, 2, 2, 2); // Reduce plot margins to 2 pixels
30
</pre><p>
31
    </p><p>
32
See <a class="xref" href="ex-truecolor-histogram.html" title="5.24. Example - Using Truecolor To Make a Histogram">Section 5.24, &#8220;Example - Using Truecolor To Make a Histogram&#8221;</a> for an example of a plot
33
where axis lines are not desired. (The configuration data as shown
34
in the example draws a full plot area border, so the axis lines would be
35
covered anyway. But if the border is turned off, the axis lines would be
36
visible unless they are suppressed as shown.)
37
    </p></div><div class="refsect1"><a id="idp1377594292"></a><h2>History</h2><p>
38
This function was added in PHPlot-5.3.0.
39
    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetDrawPlotAreaBackground.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="SetDrawXDataLabelLines.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetDrawPlotAreaBackground </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetDrawXDataLabelLines</td></tr></table></div></body></html>