Learn R Programming

PEIP (version 2.2-5)

imagesc: Image Display

Description

Display image in matlab format, i.e. flip and transpose.

Usage

imagesc(G, col = grey((1:99)/100), ...)
contoursc(G, ...)

Value

graphical side effects

Arguments

G

Image matrix

col

color scale

...

graphical parameters

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

Details

Program flips image and transposes prior to plotting. The contour version does the same and can be used to add contours.

Examples

Run this code
mtruem=matrix(rep(0, 16*16), ncol=16,nrow=16);

mtruem[9,9]=1; mtruem[9,10]=1; mtruem[9,11]=1;
mtruem[10,9]=1; mtruem[10,11]=1;
mtruem[11,9]=1; mtruem[11,10]=1; mtruem[11,11]=1;
mtruem[2,3]=1; mtruem[2,4]=1;
mtruem[3,3]=1; mtruem[3,4]=1;

imagesc(mtruem, asp=1)



Run the code above in your browser using DataLab