File: plotMatrix.R

package info (click to toggle)
r-cran-fields 16.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,972 kB
  • sloc: fortran: 1,021; ansic: 288; sh: 35; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 422 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
plotMatrix<- function( A, M=5,N=5,...){
  
  n<- nrow(A)
  m<- ncol( A)
  
  obj<-  ((A)[n:1,] )
  
  imagePlot( obj,  axes=F, xlab="columns", ylab="rows",
             ...)
   nG<- round(pretty( 1:n, n=N) )
  axis(side=1,  at= (nG-1)/(n-1), labels= format( nG) )
  mG<-  seq( 1,m, round(m/M) )
  mG<- round( pretty( 1:m, n=M))
  axis(side=2,  at= 1- (mG-1)/(m-1),
       labels= format( mG), gap.axis=0, las=2 )
  box()
}