[R] image() and nonsquare matrices

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Jan 12 11:52:41 CET 2007


Robin Hankin wrote:
> How do I draw non-square matrices with image() and get the axes right?

> Try 2:
> 
> image(1:20,1:5,a,asp=1,axes=F,xlab="label here")
> axis(side=1,pos=0)
> # No good because the x axis label is floating far from the x axis.

  Its only no good if your plot device isnt a similar aspect ratio to 
your plot... Resize your graphics window and your label will float around...

  Barry



More information about the R-help mailing list