% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sampling.R
\name{layoutByCluster}
\alias{layoutByCluster}
\title{Calculate layout based upon membership}
\usage{
layoutByCluster(gg, mem, layout = layout_with_kk)
}
\arguments{
\item{gg}{graph to layout}

\item{mem}{membership data.frame from \code{\link{calcMembership}}}

\item{layout}{algorithm to use for layout}
}
\value{
Layout in a form of 2D matrix.
}
\description{
Function to split graph into clusters and layout each cluster independently..
}
\examples{
data(karate,package='igraphdata')
alg<-'louvain'
mem<-calcMembership(karate,alg = alg)
lay<-layoutByCluster(karate,mem)
#plot(karate,layout=lay)
}
\seealso{
igraph::layout_
}
