shiny/Plot_Points_and_Bounds_Fn.R

Plot_Points_and_Bounds_Fn = function( x, y, ybounds, fn=lines, col_bounds="black", bounds_type="whiskers", border=NA, border_lty="solid", ... ){
  fn( y=y, x=x, ... )
  if( bounds_type=="whiskers" ){
    for(t in 1:length(y)){
      lines( x=rep(x[t],2), y=ybounds[t,], col=col_bounds, lty=border_lty)
    }
  }
  if( bounds_type=="shading" ){
    polygon( x=c(x,rev(x)), y=c(ybounds[,1],rev(ybounds[,2])), col=col_bounds, border=border, lty=border_lty)
  }
}
nwfsc-assess/geostatistical_delta-GLMM documentation built on July 8, 2023, 4:49 a.m.