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>SetPointShapes</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="SetPlotType.html" title="SetPlotType" /><link rel="next" href="SetPointSizes.html" title="SetPointSizes" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetPointShapes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetPlotType.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetPointSizes.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetPointShapes"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetPointShapes</span></h2><p>SetPointShapes — Select a point shape for each data set</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->SetPointShapes(<em class="parameter"><code>$pt</code></em>)</pre></div><div class="refsect1"><a id="idp1378629508"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">SetPointShapes</code> assigns a point shape to each data set
|
|
|
4 |
in a plot.
|
|
|
5 |
'Point' here refers to the marker drawn at each data point in 'points' and
|
|
|
6 |
'linepoints' type plots.
|
|
|
7 |
For example, if each data row contains 4 Y values, the first
|
|
|
8 |
point shape will be used for the first Y value, the second point shape for
|
|
|
9 |
the second Y value, etc. There are 20 point shapes to chose from.
|
|
|
10 |
</p></div><div class="refsect1"><a id="idp1378631172"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$pt</code></em></span></dt><dd><p>
|
|
|
11 |
An array of point shape names, or a string naming a single point shape.
|
|
|
12 |
If a string, that shape name is used for all data sets.
|
|
|
13 |
If an array, the array values name the point shapes for each subsequent
|
|
|
14 |
data set in a plot.
|
|
|
15 |
The following shapes are available:
|
|
|
16 |
</p><div class="informaltable"><table summary="Available shape names" border="1"><colgroup><col class="c1" /><col class="c2" /><col class="c3" /></colgroup><thead><tr><th>Shape</th><th>Shape Name</th><th>Description</th></tr></thead><tbody><tr><td align="center">
|
|
|
17 |
<span class="inlinemediaobject"><img src="images/shape-bowtie.png" alt="bowtie shape" /></span>
|
|
|
18 |
</td><td>bowtie</td><td>Two filled triangles pointing right and left towards the point.</td></tr><tr><td align="center">
|
|
|
19 |
<span class="inlinemediaobject"><img src="images/shape-box.png" alt="box shape" /></span>
|
|
|
20 |
</td><td>box</td><td>A square outline centered on the point.</td></tr><tr><td align="center">
|
|
|
21 |
<span class="inlinemediaobject"><img src="images/shape-circle.png" alt="circle shape" /></span>
|
|
|
22 |
</td><td>circle</td><td>A hollow circle centered on the point.</td></tr><tr><td align="center">
|
|
|
23 |
<span class="inlinemediaobject"><img src="images/shape-cross.png" alt="cross shape" /></span>
|
|
|
24 |
</td><td>cross</td><td>An X centered on the point.</td></tr><tr><td align="center">
|
|
|
25 |
<span class="inlinemediaobject"><img src="images/shape-delta.png" alt="delta shape" /></span>
|
|
|
26 |
</td><td>delta</td><td>A filled triangle pointing up, centered on the point.</td></tr><tr><td align="center">
|
|
|
27 |
<span class="inlinemediaobject"><img src="images/shape-diamond.png" alt="diamond shape" /></span>
|
|
|
28 |
</td><td>diamond</td><td>A filled diamond (square rotated 45 degrees), centered on the point.</td></tr><tr><td align="center">
|
|
|
29 |
<span class="inlinemediaobject"><img src="images/shape-dot.png" alt="dot shape" /></span>
|
|
|
30 |
</td><td>dot</td><td>A filled circle centered on the point.</td></tr><tr><td align="center">
|
|
|
31 |
<span class="inlinemediaobject"><img src="images/shape-down.png" alt="down shape" /></span>
|
|
|
32 |
</td><td>down</td><td>An unfilled triangle pointing down, centered on the point.</td></tr><tr><td align="center">
|
|
|
33 |
<span class="inlinemediaobject"><img src="images/shape-halfline.png" alt="halfline shape" /></span>
|
|
|
34 |
</td><td>halfline</td><td>A short line from the point going left.</td></tr><tr><td align="center">
|
|
|
35 |
<span class="inlinemediaobject"><img src="images/shape-home.png" alt="home shape" /></span>
|
|
|
36 |
</td><td>home</td><td>A filled 5-sided shape, centered on the point.</td></tr><tr><td align="center">
|
|
|
37 |
<span class="inlinemediaobject"><img src="images/shape-hourglass.png" alt="hourglass shape" /></span>
|
|
|
38 |
</td><td>hourglass</td><td>Two filled triangles pointing up and down towards the point.</td></tr><tr><td align="center">
|
|
|
39 |
<span class="inlinemediaobject"><img src="images/shape-line.png" alt="line shape" /></span>
|
|
|
40 |
</td><td>line</td><td>A horizontal line centered on the point.</td></tr><tr><td align="center">
|
|
|
41 |
<span class="inlinemediaobject"><img src="images/shape-plus.png" alt="plus shape" /></span>
|
|
|
42 |
</td><td>plus</td><td>A plus sign centered on the point.</td></tr><tr><td align="center">
|
|
|
43 |
<span class="inlinemediaobject"><img src="images/shape-rect.png" alt="rect shape" /></span>
|
|
|
44 |
</td><td>rect</td><td>A filled square centered on the point.</td></tr><tr><td align="center">
|
|
|
45 |
<span class="inlinemediaobject"><img src="images/shape-star.png" alt="star shape" /></span>
|
|
|
46 |
</td><td>star</td><td>Four lines crossing at the point.</td></tr><tr><td align="center">
|
|
|
47 |
<span class="inlinemediaobject"><img src="images/shape-target.png" alt="target shape" /></span>
|
|
|
48 |
</td><td>target</td><td>A square outline with two filled squares and two open squares, centered on the point.</td></tr><tr><td align="center">
|
|
|
49 |
<span class="inlinemediaobject"><img src="images/shape-triangle.png" alt="triangle shape" /></span>
|
|
|
50 |
</td><td>triangle</td><td>A filled triangle pointing down from the point.</td></tr><tr><td align="center">
|
|
|
51 |
<span class="inlinemediaobject"><img src="images/shape-trianglemid.png" alt="trianglemid shape" /></span>
|
|
|
52 |
</td><td>trianglemid</td><td>A filled triangle pointing down to the point.</td></tr><tr><td align="center">
|
|
|
53 |
<span class="inlinemediaobject"><img src="images/shape-up.png" alt="up shape" /></span>
|
|
|
54 |
</td><td>up</td><td>An unfilled triangle pointing up, centered on the point.</td></tr><tr><td align="center">
|
|
|
55 |
<span class="inlinemediaobject"><img src="images/shape-yield.png" alt="yield shape" /></span>
|
|
|
56 |
</td><td>yield</td><td>A filled triangle pointing down, centered on the point.</td></tr><tr><td> </td><td>none</td><td>No marker (see notes).</td></tr></tbody></table></div><p>
|
|
|
57 |
<a class="xref" href="ex-linepoints1.html#example-linepoints1" title="Example 5.7. Line/Point Plot, Point Shapes">Example 5.7, “Line/Point Plot, Point Shapes”</a> also shows all of the point shapes.
|
|
|
58 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1378680652"></a><h2>Notes</h2><p>
|
|
|
59 |
If an array is used for <em class="parameter"><code>$pt</code></em>, it
|
|
|
60 |
must use zero-based sequential integer indexes.
|
|
|
61 |
</p><p>
|
|
|
62 |
This applies only to 'points' and 'linepoints' plot types.
|
|
|
63 |
</p><p>
|
|
|
64 |
By default, ten shapes are used in order:
|
|
|
65 |
diamond, dot, delta, home, yield, box, circle, up, down, and cross.
|
|
|
66 |
</p><p>
|
|
|
67 |
A point shape can be set to 'none' to suppress the point markers for that
|
|
|
68 |
data set.
|
|
|
69 |
This is only useful with 'linepoints' plot types, and results in a 'lines'
|
|
|
70 |
plot type for that data set: a line only, but no markers.
|
|
|
71 |
</p><p>
|
|
|
72 |
PHPlot duplicates the entries in the shorter of the two arrays,
|
|
|
73 |
point sizes (set by <a class="xref" href="SetPointSizes.html" title="SetPointSizes"><span class="refentrytitle">SetPointSizes</span></a>) and point shapes,
|
|
|
74 |
to make both arrays the same size. Then it uses the entries in order,
|
|
|
75 |
restarting at the beginning, for each data set at each X value.
|
|
|
76 |
For example, if point sizes is (6, 10), and point shapes is ('diamond',
|
|
|
77 |
'dot', 'rect'), then PHPlot first extends point sizes to (6, 10, 6) to
|
|
|
78 |
match the point shapes. If there are 4 data sets to plot, PHPlot draws the
|
|
|
79 |
point markers at each X value as: diamond (size 6), dot (size 10),
|
|
|
80 |
rect (size 6), diamond (size 6).
|
|
|
81 |
</p></div><div class="refsect1"><a id="idp1378683780"></a><h2>History</h2><p>
|
|
|
82 |
Through PHPlot-5.0.7, these ten shapes were available: halfline, line, plus,
|
|
|
83 |
cross, rect, circle, dot, diamond, triangle, trianglemid, and none. The
|
|
|
84 |
default shape for all data sets was 'diamond'.
|
|
|
85 |
Starting with PHPlot-5.1.0, ten new point shapes were added, and different shape
|
|
|
86 |
defaults were assigned for ten data sets.
|
|
|
87 |
To restore the behavior in PHPlot-5.0.7 and earlier, call
|
|
|
88 |
<code class="literal">SetPointShapes('diamond')</code>.
|
|
|
89 |
</p><p>
|
|
|
90 |
Using 'none' as a point shape was added in PHPlot-5.0rc3.
|
|
|
91 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetPlotType.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="SetPointSizes.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetPlotType </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetPointSizes</td></tr></table></div></body></html>
|