Re: [R] log y 'axis' of histogram

2010-08-30 Thread David Scott
On 31/08/10 03:37, Derek M Jones wrote: Hadley, I have counts ranging over 4-6 orders of magnitude with peaks occurring at various 'magic' values. Using a log scale for the y-axis enables the smaller peaks, which would otherwise be almost invisible bumps along the x-axis, to be seen That doe

Re: [R] log y 'axis' of histogram

2010-08-30 Thread Derek M Jones
Hadley, That you're displaying something that is mathematically well founded and meaningful - but my emphasis there was on histogram. I don't think a histogram makes sense, but there are other ways of displaying the same data that would (e.g. a frequency polygon, or maybe a density plot) The

Re: [R] log y 'axis' of histogram

2010-08-30 Thread Hadley Wickham
>> That doesn't justify the use of a _histogram_  - and regardless of > > The usage highlights meaningful characteristics of the data. > What better justification for any method of analysis and display is > there? That you're displaying something that is mathematically well founded and meaningful

Re: [R] log y 'axis' of histogram

2010-08-30 Thread Derek M Jones
Hadley, I have counts ranging over 4-6 orders of magnitude with peaks occurring at various 'magic' values. Using a log scale for the y-axis enables the smaller peaks, which would otherwise be almost invisible bumps along the x-axis, to be seen That doesn't justify the use of a _histogram_ -

Re: [R] log y 'axis' of histogram

2010-08-30 Thread Hadley Wickham
> I have counts ranging over 4-6 orders of magnitude with peaks > occurring at various 'magic' values.  Using a log scale for the > y-axis enables the smaller peaks, which would otherwise > be almost invisible bumps along the x-axis, to be seen That doesn't justify the use of a _histogram_ - and

Re: [R] log y 'axis' of histogram

2010-08-30 Thread Derek M Jones
Hadley, It's not just that counts might be zero, but also that the base of each bar starts at zero. I really don't see how logging the y/axis of a histogram makes sense. I have counts ranging over 4-6 orders of magnitude with peaks occurring at various 'magic' values. Using a log scale for th

Re: [R] log y 'axis' of histogram

2010-08-30 Thread Hadley Wickham
It's not just that counts might be zero, but also that the base of each bar starts at zero. I really don't see how logging the y/axis of a histogram makes sense. Hadley On Sunday, August 29, 2010, Joshua Wiley wrote: > Hi Derek, > > Here is an option using the package ggplot2: > > library(ggplot

Re: [R] log y 'axis' of histogram

2010-08-29 Thread David Scott
On 30/08/2010 1:58 p.m., Derek M Jones wrote: All, I have been trying to get calls to hist(...) to be plotted with the y-axis having a log scale. I have tried: par(ylog=TRUE) I have also looked at the histogram package. Suggestions welcome. You appear to be looking for a log-histogram func

Re: [R] log y 'axis' of histogram

2010-08-29 Thread Joshua Wiley
Hi Derek, Here is an option using the package ggplot2: library(ggplot2) x <- sample(x = 10:50, size = 50, replace = TRUE) qplot(x = x, geom = "histogram") + scale_y_log() However, the log scale is often inappropriate for histograms, because the y-axis represents counts, which could potentially b

Re: [R] log y 'axis' of histogram

2010-08-29 Thread John Sorkin
age- From: Derek M Jones To: Sent: 8/29/2010 9:58:35 PM Subject: [R] log y 'axis' of histogram All, I have been trying to get calls to hist(...) to be plotted with the y-axis having a log scale. I have tried: par(ylog=TRUE) I have also looked at the histogram package. Sugges

[R] log y 'axis' of histogram

2010-08-29 Thread Derek M Jones
All, I have been trying to get calls to hist(...) to be plotted with the y-axis having a log scale. I have tried: par(ylog=TRUE) I have also looked at the histogram package. Suggestions welcome. -- Derek M. Jones tel: +44 (0) 1252 520 667 Knowledge Software Ltd