[R] Adjusting the Axis in a histogram to the prespecified breaks
christian.langkamp at basf.com
Mon Feb 16 20:08:24 CET 2009
I tried a few searches on hist, histogram, equidist and space (space=0 was
mentioned in one contribution), but none of that so far worked. It also says
in the help "##-- For non-equidistant breaks, counts should NOT be graphed
unscaled:" - which is precisely what I am looking for, but I cannot find it.
I want to make a histogram using breaks which are spaced exponentially and
in reference to the largest item in the dataset
(e.g. 0,1,2,4,8,16 if the largest one is 14).
I want to make a histogram where the units on the axes have the same spacing
as the breaks used for the histogram. I could of course log the whole data
set, but then explaining that transformation within a presentation is
generally not a pleasant exercise. On the other hand I would like to keep
the code short and thus would like to avoid issues like factorisation.
x<- breaks ....
hist(data, breaks= x, "xaxisbreaks=x")
At the moment the axis is equalspaced by units (2,4,6,8) with 0-2 having 2
areas and the blocks 4-6 and 6-8 only having one block.
I tried also the xlog entry (i.e. log="x") which returned "log" is not valid
(ist kein Grafikparameter).
I tried also fixing things with the par utility (>par(log=TRUE)) which again
did not work.
Hence if somebody has a recommendation (possibly a link to an older
contribution which I did not find using the above searches), that would be
View this message in context: http://www.nabble.com/Adjusting-the-Axis-in-a-histogram-to-the-prespecified-breaks-tp22043635p22043635.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help