A bar plot or bar chart, is a graph of the frequency of categorical data. It is differentiated from a histogram because in a bar plot, the data are inherently categorical.
Questions tagged [barplot]
77 questions
15
votes
2 answers
"When to use boxplot and when barplot" rules (of thumb?)
Both box-and-whisker plot and bar chart are appropriate graphics
for ANOVA according to The R Book (Crawley, 2013),
but which is more appropriate? I suppose it depends on situation... can anybody help me?

Ladislav Naďo
- 2,202
- 4
- 21
- 45
13
votes
3 answers
Plotting results having only mean and standard deviation
I am trying to visualize an appropriate plot for the observations in this table of means and standard deviations of recall scores:
\begin{array} {c|c c|c c|}
& \text{Control} & & \text{Experimental} & \\
& \text{Mean} & \text{SD} &\text{Mean}…

l..
- 287
- 3
- 5
- 15
12
votes
2 answers
Drawing multiple barplots on a graph in R
I would like to plot four barplots on a single graph in R. I have used the following code. Here, how can keep a legend on top of the graph, specifically the legend should be between 2 and 3 barplots. I also tried with par(mar=c(4.1,4.1,8.1,4.1) but…

samarasa
- 1,287
- 6
- 18
- 26
9
votes
3 answers
How to create a barplot diagram where bars are side-by-side in R
I want to create a bardiagram for these data in R (read from a CVS file):
Experiment_Name MetricA MetricB
Just_X 2 10
Just_X_and_Y 3 20
to have the following diagram:
I am beginner and I do not know even how to…

Skarab
- 987
- 4
- 11
- 14
9
votes
2 answers
Visualizing multiple "histograms" (bar-charts)
I am having difficulties to select the right way to visualize data. Let's say we have bookstores that sells books, and every book has at least one category.
For a bookstore, if we count all the categories of books, we acquire a histogram that shows…

nimcap
- 413
- 4
- 8
8
votes
2 answers
What is this chart called?
I designed this chart to combine the benefits offered by a Bar chart and a Pie chart. Its closest known alternative is the Pareto chart. With this (new?) chart, the Line graph is replaced by a Waterfall chart, for two main reasons:
It better…

Ismael Ghalimi
- 1,968
- 2
- 12
- 21
7
votes
3 answers
Group vs Stacked Bar Plots
What are the appropriate uses for a grouped vs a stacked bar plot?

Elpezmuerto
- 1,125
- 4
- 14
- 22
7
votes
3 answers
Stacked bar plot
I have a data-frame whose first column is the name of an item and the second column is the frequency of that item in the dataset.
names freq
1 tomato 7
2 potato 4
3 cabbage 5
4 sukuma-wiki 8
5 terere …

eastafri
- 543
- 3
- 9
- 15
7
votes
1 answer
Displaying mean +/- st. error or confidence interval on bar charts
When I look at scientific papers, bar charts I usually come to see are shown with mean +/- sem (standard error of the mean).
As stated here,
When standard error (SE) bars do not overlap, you cannot be sure that
the difference between two means is…

Dan Chaltiel
- 1,089
- 12
- 25
6
votes
1 answer
Bar plots with variable bases (intensive and extensive variables at once)
Is there a particular name for bar plots, in which bars are rectangular, with unequal bases?
That is:
width represents size (e.g. population),
height represents intensive variable (e.g. CO$_2$ emission per capita),
area represents extensive…

Piotr Migdal
- 5,586
- 2
- 26
- 70
6
votes
1 answer
Calculating standard error and attaching an error bar on ggplot2 bar chart
Given a minimal dataset where am looking for the occurrence of a certain motif within a dataset of 500 observations. with_motif represents obervations with the specified motif and without_motif are observations without the motif.
with_motif <-…

eastafri
- 543
- 3
- 9
- 15
5
votes
2 answers
Is there a better way than side-by-side barplots to compare binned data from different series
I have a number histogram from a data source. I want to compare their distribution. For example series 2 is more to the right than series 1.
Is there any good way to contrast besides plotting the histogram side by side. I can think of qqplot or box…

Wai Yip Tung
- 203
- 2
- 7
5
votes
4 answers
How to visualize two bar charts with very different scales without looking redundant
More an aesthetics question to do with presentation of statistical data, say you have 2 sets of data,
speed weight
a 2.2 500
b 4.7 222
c 7.3 999
d 3.1 1000
So if you plot the speeds and weights on…

bobobobo
- 153
- 1
- 5
5
votes
1 answer
Error bars on bar graphs: Is reporting confidence intervals really better than reporting standard errors of the means?
I have heard this advice repeatedly however recently when I was looking at my own graph with CIs I had a panic attack because the error bars overlapped, yet my analysis told me the difference between the means was significant. I later learned
here…

PanPsych
- 440
- 4
- 13
5
votes
1 answer
Can I pass an "at" parameter for the x-axis locations of bars, to an R barplot?
Hi in base graphics in R, I would like to overlay a bar plot on a chart which has irregularly spaced points on a curve. The bars should represent the change in these points since the previous sample. But I would like the bars to align to the points…

Thomas Browne
- 819
- 1
- 16
- 28