[R] Labels for matplot x axis
Jim Lemon
jim at bitwrit.com.au
Tue Jun 22 13:48:41 CEST 2010
On 06/22/2010 08:05 PM, Nick Torenvliet wrote:
> Hi all, I've been messing with this for a while now..
>
> myStudy is a matrix of word frequency to date of document/document.
>
> As you can see I'm trying to plot the series in the matrix.
>
> I'd like three things --
> 1- In the plot that gets created the first series is a solid line, the rest
> are dashed... how do I make them either one or the other.
lty=1
> 2- The legend that comes up has filled boxes with colour as legend keys,
> I'd like to show coloured lines for legend keys instead.
specify col=("blue","red","green"),lty=1 instead of fill()
> 3- The x axis of the plot come up labelled 0-80 with major intervals of
> twenty, I'd like to see (@45 degrees) the axis labelled with the rownames
> of myStudy, and I'd like to be able to control the interval at which these
> major ticks are displayed.
try staxlab(1,at=1:95,labels=rownames(myStudy),srt=45,cex=0.5) but you
will want to stretch the plot out horizontally and adjust the "cex"
argument to get the best readability.
Jim
More information about the R-help
mailing list