Try this:
ggplot(data=dat, aes(x=Types, y=Number, fill=sample)) +
geom_bar(position = 'dodge', stat="identity") +
geom_text(aes(label=Number), position=position_dodge(width=0.9), vjust=-0.25)
More Related Contents:
- Multirow axis labels with nested grouping variables
- Position geom_text on dodged barplot
- Put stars on ggplot barplots and boxplots – to indicate the level of significance (p-value)
- Stacked Bar Plot in R
- Reverse stacked bar order
- Grouped bar plot in ggplot
- How can I change the Y-axis figures into percentages in a barplot?
- How to center stacked percent barchart labels
- Plotting bar charts on map using ggplot2?
- How to produce stacked bars within grouped barchart in R [duplicate]
- How can I add hatches, stripes or another pattern or texture to a barplot in ggplot?
- Grouped barplot in R with error bars
- Alignment of numbers on the individual bars
- Combining Bar and Line chart (double axis) in ggplot2
- draw the sum value above the stacked bar in ggplot2
- ggplot2 3D Bar Plot
- Plotting a stacked bar plot?
- R ggplot2: stat_count() must not be used with a y aesthetic error in Bar graph
- ggplot2 : Plot mean with geom_bar
- How to align the bars of a histogram with the x axis?
- How to plot a Stacked and grouped bar chart in ggplot?
- Add percentage labels to a stacked barplot
- ggplot2: Setting geom_bar baseline to 1 instead of zero
- How to overlay two geom_bar?
- Bars in geom_bar have unwanted different widths when using facet_wrap
- ggplot multiple grouping bar
- Drawing a barchart to compare two sets of data using ggplot2 package?
- How to order bars within all facets?
- Bar plot, no space between bottom of geom and x axis keep space above
- How to get a barplot with several variables side by side grouped by a factor