Andreas Baranowski
2010-Jun-11 13:09 UTC
[R] r code to broaden the boarder of the bars of a histogram
To whom it may concern, I have a problem concerning the design of a histogram. How do I change the border widths of the bars of a histogram. The initial command is: hist (punkte,breaks=30, xlab="Punkte", ylab="H?ufigkeit", main="Histogramm", col= heat.colors(30), border= "red") I suspect that it has to do with the "lwd" command but can't figure it out. Kind regards, Andreas Baranowski University of Klagenfurt Universit?tsstra?e 65-67 9020 Klagenfurt Austria
Petr PIKAL
2010-Jun-11 15:06 UTC
[R] Odp: r code to broaden the boarder of the bars of a histogram
Hi Look at the source code. graphics:::plot.histogram You can find that boxes are actually drawn by rect So if you want to use standard graphics, you probably need to modify source code and set up your version of plot.histogram. Maybe with ggplot2 package you can find some way how to do what you want but you shall check yourself. Regards Petr r-help-bounces at r-project.org napsal dne 11.06.2010 15:09:21:> To whom it may concern, > > I have a problem concerning the design of a histogram. How do I change > the border widths of the bars of a histogram. The initial command is: > > hist (punkte,breaks=30, xlab="Punkte", ylab="H?ufigkeit", > main="Histogramm", col= heat.colors(30), border= "red") > > I suspect that it has to do with the "lwd" command but can't figure itout.> > Kind regards, > Andreas Baranowski > > > > University of Klagenfurt > Universit?tsstra?e 65-67 > 9020 Klagenfurt > Austria > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
Peter Ehlers
2010-Jun-11 15:13 UTC
[R] r code to broaden the boarder of the bars of a histogram
Use truehist() in pkg:MASS. -Peter Ehlers On 2010-06-11 7:09, Andreas Baranowski wrote:> To whom it may concern, > > I have a problem concerning the design of a histogram. How do I change > the border widths of the bars of a histogram. The initial command is: > > hist (punkte,breaks=30, xlab="Punkte", ylab="H?ufigkeit", > main="Histogramm", col= heat.colors(30), border= "red") > > I suspect that it has to do with the "lwd" command but can't figure it out. > > Kind regards, > Andreas Baranowski > > > > University of Klagenfurt > Universit?tsstra?e 65-67 > 9020 Klagenfurt > Austria