% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-segmentedCells.R
\name{plot,SegmentedCells,ANY-method}
\alias{plot,SegmentedCells,ANY-method}
\alias{plot}
\alias{plot,SegmentedCells}
\title{A basic plot for SegmentedCells object}
\usage{
\S4method{plot}{SegmentedCells,ANY}(x, imageID = NULL)
}
\arguments{
\item{x}{A SegmentedCells object.}

\item{imageID}{The image that should be plotted.}
}
\value{
A ggplot object.
}
\description{
This function generates a basic x-y plot of the location coordinates and cellType data.
}
\section{usage}{

`plot(x, imageID = NULL)`
}

\examples{
### Something that resembles cellProfiler data

set.seed(51773)

n = 10

cells <- data.frame(row.names = seq_len(n))
cells$ObjectNumber <- seq_len(n)
cells$ImageNumber <- rep(1:2,c(n/2,n/2))
cells$AreaShape_Center_X <- runif(n)
cells$AreaShape_Center_Y <- runif(n)
cells$AreaShape_round <- rexp(n)
cells$AreaShape_diameter <- rexp(n, 2)
cells$Intensity_Mean_CD8 <- rexp(n, 10)
cells$Intensity_Mean_CD4 <- rexp(n, 10)

cellExp <- SegmentedCells(cells, cellProfiler = TRUE)

### Cluster cell types
markers <- cellMarks(cellExp)
kM <- kmeans(markers,2)
cellType(cellExp) <- paste('cluster',kM$cluster, sep = '')

#plot(cellExp, imageID=1)

}
