Skip to content
Back to formatted view

Raw Message

Message-ID: <8975119BCD0AC5419D61A9CF1A923E950300838F@iahce2ksrv1.iah.bbsrc.ac.uk>
Date: 2006-02-23T15:35:22Z
From: michael watson (IAH-C)
Subject: Changing the x-axis labels in plot()

Hi

Hopefully this one isn't in the manual or I am about to get shot :-S

One of my colleagues wants a slightly strange graph.  We basically have
a data matrix, and she wants to plot, for each row, the values in the
row as points on the graph.  The following code draws the graph just
fine:

plot(row(d)[,3:9],d[,3:9])

So as there are 12 rows in my matrix, there are 12 columns of points,
which is what she wants.

However, she wants the x-axis labelled with the row names, not with
1,2,3,4,5 etc

I can figure out from reading par() how to turn off the default drawing
of the numerical labels, but how do I use the row names instead?

Thanks
Mick