Skip to content
Back to formatted view

Raw Message

Message-ID: <BANLkTinNXLS-Hses_Y8LpQyM9K6XsQQwrjCSq2o8VQaf71W9XA@mail.gmail.com>
Date: 2011-06-28T00:36:04Z
From: Joshua Wiley
Subject: Help with histogram intervals
In-Reply-To: <2cc58.4d9a373.3b3a6adf@aol.com>

Hi Ivo,

It depends how you are making the histogram plot.  If you are using
the traditional graphics hist() function, then look at the argument,
"breaks" (type ?hist at the console to pull up the documentation
explaining this).  For example:

hist(x = sample(1:20, 300, TRUE), breaks = seq(0, 20, by = 2))

HTH,

Josh

On Mon, Jun 27, 2011 at 4:23 PM,  <Gwanmesia at aol.com> wrote:
> Dear Sir,
>
> How do I change the intervals on the x axis of a histogram plot; let us say
> ?for example the intervals were 0,5,10,15,and 20, and I wanted to change
> the ?intervals to 0,2,4,6,8,10,12,14,16,18,20.
>
> I look forward to receiving your words of wisdom.
>
> Ivo
>
> ? ? ? ?[[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.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/