Hello all, I have a peculiar and particular bug that I stumbled across with ggplot2. I cannot seem to replicate it with anything other than my specific data set.
Here is the problem: - when I try to plot a histogram, allowing for ggplot2 to decide the binwidths itself, I get the following error: - stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this. - Error: position_stack requires constant width My code is simply: ggplot(data=myDataSet, aes(x=myVarOI)) + geom_histogram() or qplot(myDataSet$myVarOI) If I go ahead and set the binwidth to some value, then the plot can be made without problems. The problem is with the specific data that it is trying to plot. I suspect it is trying to create bins of different sizes, from the error code. Here are the basics of my data set: - length: 1936 entries - 1906 unique entries - stats: - Min. 1st Qu. Median Mean 3rd Qu. Max. 3.200e+09 6.312e+09 6.591e+09 6.874e+09 7.551e+09 1.083e+10 I cannot imagine this can be solved without my specifically uploading the actual data. If I simply attach it, will it be received by r-help? Hadley, if you're interested, would you like me to send you the data directly to you? Regards, Mike "Telescopes and bathyscaphes and sonar probes of Scottish lakes, Tacoma Narrows bridge collapse explained with abstract phase-space maps, Some x-ray slides, a music score, Minard's Napoleanic war: The most exciting frontier is charting what's already here." -- xkcd -- Help protect Wikipedia. Donate now: http://wikimediafoundation.org/wiki/Support_Wikipedia/en [[alternative HTML version deleted]] ______________________________________________ R-help@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.