[R] Fwd: col.axis

Lukas Schefczyk Rlist at mschefczyk.de
Sun Mar 28 22:52:09 CEST 2010


Hi

you can use mtext()


m <- c( 58, 47, 51, 57, 48)
plot(1:5, m, pch=19, col=1:5, axes=FALSE)
axis(1, at=1:length(m), labels=LETTERS[1:5], col.axis=FALSE) # color =FALSE 
to make them disappear

at <- axTicks(1) # get Ticks from Axis 1
mtext(side = 1, text = at, at = at, col = (1:5), line = 1)




Lukas Schefczyk

(btw my first message here)

--------------------------------------------------
From: "Enio Jelihovschi" <eniojelihovs at gmail.com>
Sent: Sunday, March 28, 2010 10:07 PM
To: <r-help at r-project.org>
Subject: [R] Fwd: col.axis

> I need a help in the following code. I could not find any hint at the help
> files
>
> m <- c( 58, 47, 51, 57, 48)
> plot(1:5, m, pch=19, col=1:5, axes=FALSE)
>  axis(1, at=1:length(m), labels=LETTERS[1:5], col.axis=2)
>
> The labels A B C D E appear in this case with the red color.
> What I really want is that thay get the same color as the circles, but if 
> I
> try the line
>
> axis(1, at=1:length(m), labels=LETTERS[1:5], col.axis=1:5)
>
> I get the message " the graphic parameter "col.axis" has the wrong 
> length".
>
> Is there any way to circumvent it?
> Thank you very much
> Enio Jelihovschi
> UESC, Brasil
>
> [[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.



More information about the R-help mailing list