[R] custom tick labels on image

From: Pieter Provoost <pieterprovoost_at_gmail.com>
Date: Fri 07 Jul 2006 - 02:29:30 EST


I'm trying to visualise a matrix using image(), and I would like to add the row and column names as tick labels. I tried adding an axis, but the problem is that this axis goes from 0 to 1 which results in labels being added starting at the far right end of the axis.

image(t(data), col = terrain.colors(20), axes=FALSE) axis(3, at = 1:length(colnames(data)), labels=colnames(data))

How can I do this better?

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 07 02:34:40 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 07 Jul 2006 - 04:15:25 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.