<!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: Plot of factorial maps with representation of point classes</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 s.class"><tr><td>s.class</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Plot of factorial maps with representation of point classes</h2>

<h3>Description</h3>

<p>performs the scatter diagrams with representation of point classes. 
</p>


<h3>Usage</h3>

<pre>
s.class(dfxy, fac, wt = rep(1, length(fac)), xax = 1, 
    yax = 2, cstar = 1, cellipse = 1.5, axesell = TRUE, 
    label = levels(fac), clabel = 1, cpoint = 1, pch = 20, 
    col = rep(1, length(levels(fac))), xlim = NULL, ylim = NULL, 
    grid = TRUE, addaxes = TRUE, origin = c(0,0), 
    include.origin = TRUE, sub = "", csub = 1, possub = "bottomleft", 
    cgrid = 1, pixmap = NULL, contour = NULL, area = NULL, add.plot = FALSE)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>dfxy</code></td>
<td>
<p>a data frame containing the two columns for the axes</p>
</td></tr>
<tr valign="top"><td><code>fac</code></td>
<td>
<p>a factor partitioning the rows of the data frame in classes</p>
</td></tr>
<tr valign="top"><td><code>wt</code></td>
<td>
<p>a vector of the point weightings of the data frame used for computing the means (star centers) and the ellipses of dispersion</p>
</td></tr>
<tr valign="top"><td><code>xax</code></td>
<td>
<p>the column number of x in <code>dfxy</code></p>
</td></tr>
<tr valign="top"><td><code>yax</code></td>
<td>
<p>the column number of y in <code>dfxy</code></p>
</td></tr>
<tr valign="top"><td><code>cstar</code></td>
<td>
<p>a number between 0 and 1 which defines the length of the star size</p>
</td></tr>
<tr valign="top"><td><code>cellipse</code></td>
<td>
<p>a positive coefficient for the inertia ellipse size</p>
</td></tr>
<tr valign="top"><td><code>axesell</code></td>
<td>
<p>a logical value indicating whether the ellipse axes should be drawn</p>
</td></tr>
<tr valign="top"><td><code>label</code></td>
<td>
<p>a vector of strings of characters for the point labels</p>
</td></tr>
<tr valign="top"><td><code>clabel</code></td>
<td>
<p>if not NULL, a character size for the labels, used with <code>par("cex")*clabel</code></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>pch</code></td>
<td>
<p>if <code>cpoint</code> &gt; 0, an integer specifying the symbol or the single character to be used in plotting points</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>xlim</code></td>
<td>
<p>the ranges to be encompassed by the x, if NULL they are computed</p>
</td></tr>
<tr valign="top"><td><code>ylim</code></td>
<td>
<p>the ranges to be encompassed by the y, 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>addaxes</code></td>
<td>
<p>a logical value indicating whether the axes should be plotted</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>include.origin</code></td>
<td>
<p>a logical value indicating whether the point &quot;origin&quot; should be belonged to the graph space</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>
<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>pixmap</code></td>
<td>
<p>an object 'pixmap' displayed in the map background</p>
</td></tr>
<tr valign="top"><td><code>contour</code></td>
<td>
<p>a data frame with 4 columns to plot the contour of the map : each row gives a segment (x1,y1,x2,y2)</p>
</td></tr>
<tr valign="top"><td><code>area</code></td>
<td>
<p>a data frame of class 'area' to plot a set of surface units in contour</p>
</td></tr>
<tr valign="top"><td><code>add.plot</code></td>
<td>
<p>if TRUE uses the current graphics window</p>
</td></tr>
</table>


<h3>Value</h3>

<p>The matched call.
</p>


<h3>Author(s)</h3>

<p>Daniel Chessel</p>


<h3>Examples</h3>

<pre>
if(!adegraphicsLoaded()) {
  xy &lt;- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 1))
  posi &lt;- factor(xy$x &gt; 0) : factor(xy$y &gt; 0)
  coul &lt;- c("black", "red", "green", "blue")
  par(mfrow = c(2, 2))
  s.class(xy, posi, cpoi = 2)
  s.class(xy, posi, cell = 0, cstar = 0.5)
  s.class(xy, posi, cell = 2, axesell = FALSE, csta = 0, col = coul)
  s.chull(xy, posi, cpoi = 1)
  par(mfrow = c(1, 1))
  
  ## Not run: 
  data(banque)
  dudi1 &lt;- dudi.acm(banque, scannf = FALSE)
  coul = rainbow(length(levels(banque[, 20])))
  par(mfrow = c(2, 2))
  s.label(dudi1$li, sub = "Factorial map from ACM", csub = 1.5, 
    possub = "topleft")
  s.class(dudi1$li, banque[, 20], sub = names(banque)[20], 
    possub = "bottomright", cell = 0, cstar = 0.5, cgrid = 0, csub = 1.5)
  s.class(dudi1$li, banque[, 20], csta = 0, cell = 2, cgrid = 0, 
    clab = 1.5)
  s.class(dudi1$li, banque[, 20], sub = names(banque)[20], 
    possub = "topright", cgrid = 0, col = coul)
  par(mfrow = c(1, 1))
  
  par(mfrow = n2mfrow(ncol(banque)))
  for(i in 1:(ncol(banque)))
    s.class(dudi1$li, banque[, i], clab = 1.5, sub = names(banque)[i], 
      csub = 2, possub = "topleft", cgrid = 0, csta = 0, cpoi = 0)
  s.label(dudi1$li, clab = 0, sub = "Common background")
  par(mfrow = c(1, 1))

## End(Not run)
}</pre>


</body></html>
