R/structurePlot.R

Defines functions structurePlot

Documented in structurePlot

#' Interaction Structure plot
#'
#' @param cMat The matrix with interacting positions.
#' @author Victor Freguglia Souza
#' @export
#'
structurePlot = function(cMat){
  x = complete_cMat(cMat)[,1]
  y = complete_cMat(cMat)[,2]
  df = data.frame(x,y)
  p = ggplot(df,aes(x=x,y=y,xmin=-5,xmax=5)) +
    geom_tile(fill="gray90",colour="black") +
    scale_x_continuous(limits=c(-5,5)) +
    scale_y_continuous(limits=c(-5,5)) +
    theme_void() +
    annotate("text", x = 0, y = 0, label = "i")
  plot(p)
}
VicFreguglia/GibbsRF documentation built on Oct. 25, 2019, 11:19 p.m.