X-Git-Url: https://git.auder.net/?p=synclust.git;a=blobdiff_plain;f=R%2Fgraphics.R;h=e11a6371e327b7bf416ebaca93529b254e822cb8;hp=9ce8a3a2548e1a13aff952bf1c70d78bdabbce45;hb=ad26cb61b84c4d603980d0da65a9ed19cc9af778;hpb=7ff8c3e6b0960158f79275fd4a407b30690fd120 diff --git a/R/graphics.R b/R/graphics.R index 9ce8a3a..e11a637 100644 --- a/R/graphics.R +++ b/R/graphics.R @@ -1,4 +1,9 @@ -#draw (France or...) map with all sites of colors 'cols' +#' Draw (France or...) map with all sites of colors 'cols' +#' +#' @param M Coordinates matrix (in columns) +#' @param cols Vector of colors for each row of M [default: all black] +#' @export +#' drawMapWithSites = function(M, cols=rep(1,nrow(M))) { xMin = range(M[,1])[1] @@ -17,7 +22,12 @@ drawMapWithSites = function(M, cols=rep(1,nrow(M))) } } -#draw neighborhoods graph on top of a country map (or any other map) +#' Draw neighborhoods graph on top of a country map (or any other map) +#' +#' @param M Coordinates matrix (in columns) +#' @param NI Neighborhoods of M rows (list of integer vectors) +#' @export +#' drawNeighborhoodGraph = function(M, NI) { for (i in 1:length(NI)) @@ -27,7 +37,12 @@ drawNeighborhoodGraph = function(M, NI) } } -#plot a matrix of curves (in rows) +#' Plot a matrix of curves (in rows) +#' +#' @param M Coordinates matrix (in columns) +#' @param cols Vector of colors for each row of M [default: all black] +#' @export +#' plotCurves = function(M, cols=rep(1,nrow(M))) { n = nrow(M)