[R] Centering labels on X-axis
ruipbarradas at sapo.pt
Fri Oct 19 19:24:48 CEST 2012
Your working code needs a plot first:
plot(1:5, xaxt = "n")
And there's no 'text' argument to axis(). As for the centering of axis
labels, they're centered on my graphics device. Exactly what is
happening to yours?
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)
 LC_COLLATE=Portuguese_Portugal.1252 LC_CTYPE=Portuguese_Portugal.1252
 LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C
attached base packages:
 stats graphics grDevices utils datasets methods base
other attached packages:
 ggplot2_0.9.2 igraph_0.6-2
loaded via a namespace (and not attached):
 colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 fortunes_1.5-0
 grid_2.15.1 gtable_0.1.1 labeling_0.1 MASS_7.3-21
 memoise_0.1 munsell_0.3 plyr_1.7.1 proto_0.3-9.2
 RColorBrewer_1.0-5 reshape2_1.2.1 scales_0.2.2 stringr_0.6.1
Hope this helps,
Em 19-10-2012 15:39, YAddo escreveu:
> Dear all:
> I am trying to center labels on my plot with not much success. I have tried
> text(), mtext() but it's not working. I think I am using the wrong function
> for my task.
> Any help will be appreciated.
> My working codes.
> Many thanks in advance
> View this message in context: http://r.789695.n4.nabble.com/Centering-labels-on-X-axis-tp4646761.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> 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