<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: 1D plot of a numeric score and a factor with labels</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="https://rpkg.net/assets/examples.css" />
</head><body>

<table width="100%" summary="page for sco.class"><tr><td>sco.class</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>1D plot of a numeric score and a factor with labels</h2>

<h3>Description</h3>

<p>Draws evenly spaced labels, each label linked to the corresponding
values of the levels of a factor.
</p>


<h3>Usage</h3>

<pre>
sco.class(score, fac, label = levels(fac), clabel = 1, horizontal = TRUE, 
    reverse = FALSE, pos.lab = 0.5, pch = 20, cpoint = 1, boxes = TRUE, 
    col = rep(1, length(levels(fac))), lim = NULL, grid = TRUE, 
    cgrid = 1, include.origin = TRUE, origin = c(0, 0), sub = "", 
    csub = 1.25, possub = "bottomleft")
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>score</code></td>
<td>
<p>a numeric vector</p>
</td></tr>
<tr valign="top"><td><code>fac</code></td>
<td>
<p>a factor</p>
</td></tr>
<tr valign="top"><td><code>label</code></td>
<td>
<p>labels for the levels of the factor</p>
</td></tr>
<tr valign="top"><td><code>clabel</code></td>
<td>
<p>a character size for the labels, used with
<code>par("cex")*clabel</code></p>
</td></tr>
<tr valign="top"><td><code>horizontal</code></td>
<td>
<p>logical. If TRUE, the plot is horizontal</p>
</td></tr>
<tr valign="top"><td><code>reverse</code></td>
<td>
<p>logical. If horizontal = TRUE and reverse=TRUE, the
plot is at the bottom, if reverse = FALSE, the plot is at the top. If
horizontal = FALSE, the plot is at the right (TRUE) or at the left
(FALSE).</p>
</td></tr>
<tr valign="top"><td><code>pos.lab</code></td>
<td>
<p>a values between 0 and 1 to manage the position of the
labels.</p>
</td></tr>
<tr valign="top"><td><code>pch</code></td>
<td>
<p>an integer specifying the symbol or the single character to be used in plotting points</p>
</td></tr>
<tr valign="top"><td><code>cpoint</code></td>
<td>
<p>a character size for plotting the points, used with <code>par("cex")*cpoint</code>. If zero, no points are drawn</p>
</td></tr>
<tr valign="top"><td><code>boxes</code></td>
<td>
<p>if TRUE, labels are framed</p>
</td></tr>
<tr valign="top"><td><code>col</code></td>
<td>
<p>a vector of colors used to draw each class in a different color</p>
</td></tr>
<tr valign="top"><td><code>lim</code></td>
<td>
<p>the range for the x axis or y axis (if horizontal = FALSE), if NULL, they are computed</p>
</td></tr>
<tr valign="top"><td><code>grid</code></td>
<td>
<p>a logical value indicating whether a grid in the background of the plot should be drawn</p>
</td></tr>
<tr valign="top"><td><code>cgrid</code></td>
<td>
<p>a character size, parameter used with par(&quot;cex&quot;)* <code>cgrid</code> to indicate the mesh of the grid</p>
</td></tr>
<tr valign="top"><td><code>include.origin</code></td>
<td>
<p>a logical value indicating whether the point &quot;origin&quot; should belong to the plot</p>
</td></tr>
<tr valign="top"><td><code>origin</code></td>
<td>
<p>the fixed point in the graph space, for example c(0,0) the origin axes</p>
</td></tr>
<tr valign="top"><td><code>sub</code></td>
<td>
<p>a string of characters to be inserted as legend</p>
</td></tr>
<tr valign="top"><td><code>csub</code></td>
<td>
<p>a character size for the legend, used with <code>par("cex")*csub</code></p>
</td></tr>
<tr valign="top"><td><code>possub</code></td>
<td>
<p>a string of characters indicating the sub-title position (&quot;topleft&quot;, &quot;topright&quot;, &quot;bottomleft&quot;, &quot;bottomright&quot;)</p>
</td></tr>
</table>


<h3>Value</h3>

<p>The matched call.
</p>


<h3>Author(s)</h3>

<p>StÃ©phane Dray <a href="mailto:stephane.dray@univ-lyon1.fr">stephane.dray@univ-lyon1.fr</a></p>


<h3>Examples</h3>

<pre>
data(meau)
envpca &lt;- dudi.pca(meau$env, scannf=FALSE)
par(mfrow=c(2,1))
sco.class(envpca$li[,1],meau$design$season, col = 1:6)
sco.class(envpca$li[,1],meau$design$season, col = 1:4, reverse = TRUE)
</pre>


</body></html>
