[R] changing the index of a histogram

Mag. Ferri Leberl ferri.leberl at gmx.at
Thu Sep 21 20:28:03 CEST 2006

Dear everybody!
I am trying to make up a histogram of marks of a recent test I have
Say I have a vector "points" and a vektor "breaks" to segregate the
marks. Finally there is a vector "marks".

hist(points, breaks=breaks) leaves me with two problems:
At first the width of the bars of the histogram corresponds with the
width of the intervall. This will look confusing and not very elaborated
when in the end the index shall not be "breaks", but "marks".
At second, you guessed it, I have the problem to exchange "breaks" for
"marks" on the y-axis, at least surfacially.
A glance into old mailing list brought me 
as a good solution to the first matter (except that right=FALSE seems
contradictory ;)
I would be very glad if you could give me a hint to solve the second
problem, most preferably such, that the first would be circumvaded by
transforming the variable intervals of "breaks" into the uniform ones of
"marks" and then employing hist().
Thank you in advance.
Mag. Ferri Leberl

More information about the R-help mailing list