An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121204/5229e47a/attachment.ksh>
Labelling x axis in plot function
3 messages · T Bal, Rui Barradas, Jim Lemon
Hello, You should provide sample data and code. plot(3:10, xlim = c(0, 12), xaxt = "n") axis(1, at = 1:12) See the help page ?par for a description of the graphical parameters 'xlim' and 'xaxt', and of ?axis. Hope this helps, Rui Barradas Em 04-12-2012 17:24, T Bal escreveu:
Hi, In the plot function I want to label x axis as the numbers between 1 and 12 (so 1, 2, 3, 4, 5, ..., 12). How should I do it? The range of x values are different than this range. Thanks! Kind regards, T. Bal [[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.
On 12/05/2012 04:24 AM, T Bal wrote:
Hi, In the plot function I want to label x axis as the numbers between 1 and 12 (so 1, 2, 3, 4, 5, ..., 12). How should I do it? The range of x values are different than this range. Thanks!
Hi T Bal, You are probably troubled by missing labels. Try the staxlab (plotrix) function after adding xaxt="n" to your plot call`. Jim