Re: [R] Labels for matplot x axis

From: Nick Torenvliet <nick.torenvliet_at_gmail.com>
Date: Tue, 22 Jun 2010 16:23:08 -0400

Jim, I just checked your help out and everything works fine except the axis labels, I should probably have been more specific. I had already been able to draw the rownames() as labels, what I was looking for was the capacity to define major ticks, and hence draw only every nth rowname on the graph as a label with a tickmark... is this possible?

On Tue, Jun 22, 2010 at 7:48 AM, Jim Lemon <jim_at_bitwrit.com.au> wrote:

> 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
>

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 22 Jun 2010 - 21:28:18 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 Jun 2010 - 22:00:37 GMT.

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

list of date sections of archive