[Rd] Suggestion: barplot function

danielrenato at lycos.com danielrenato at lycos.com
Sun Feb 19 23:33:47 CET 2017


Hi Marc and Robert, 

Thank you so much for the answer! 

I agree with both of you, specially with Robert "barplots are a common
graphing mechanism used by my scientific colleagues to convey their
data, and I don't see that changing any time soon... The one thing that
is even less forgivable ... is bars with no dispersion indication at
all." (what barplot() allows). 

Nowadays there are dozens of new papers everyday, and to make it
easier/faster to the readers, it is very common (in biological sciences)
authors show the data using bar-plots (that represent mean of treatments
and the standard deviation - and usually with letters representing if
the treatments are different, or not, using some statistical test). 

Maybe it is not a great way, but it is in an intuitive way largely used
in natural sciences that make it easier to the readers. And it is
accepted in most of the scientific journals, including Science, Nature,
PNAS, Frontiers... 

I agree with Marc that it is nice that R is flexible, so people can go
around even that it is not the default. However it is a difficult task
for most of the users (e.g.from biological sciences). 

Thank you Marc and Robert, 

Cheers, Daniel 

On 2017-02-03 14:23, Robert Baer wrote:

> On 1/27/2017 8:30 AM, danielrenato at lycos.com wrote: 
> 
>> Hello developers folks!
>> 
>> First, congratulations for the wonderful work with R.
>> 
>> For science, barplots with error bars are very important. We were wondering that is so easy to use the boxplot function:
>> 
>> boxplot(Spores~treatment, col=treatment_colors)
>> 
>> But there is no such function for barplots with standard deviation or standard error. It becomes a "journey" to plot a simple graph (e.g. https://www.r-bloggers.com/building-barplots-with-error-bars/).
>> 
>> The same way that is easy to use the boxplot function, do you think it is possible to upgrade the barplot function: i.e.: barplot(Spores~treatment, error.bar=standard_error, col=treatment_colors)
> Marc may not speak for R Core, but he certainly has summarized what has been an apparent consensus attitude to barplot() and confidence bars in this community over the last decade.  Further, he is probably right about no changes after this many years.
> 
> I might mention that if you want a close cousin to barplot() that does what you want with base graphics (from the drawing mechanics point of view) see the barplot2() function in the gplots package. You provide your own bar lengths.  Regardless of their merits, barplots are a common graphing mechanism used by my scientific colleagues to convey their data, and I don't see that changing any time soon.  The one thing that is even less forgivable than dynamite plots is bars with no dispersion indication at all. Too bad barplot2() isn't the default.
> 
>> Thank you so much!
>> Daniel, FU-Berlin
>> 
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
	[[alternative HTML version deleted]]



More information about the R-devel mailing list