I do it at the beginning to make sur barplots are OVER it. # library library(tidyverse) library(viridis) # Create dataset data % gather( key = 'observation', value= 'value', - c( 1, 2)) # Set a number of 'empty bar' to add at the end of each group empty_bar % arrange(group, individual) data $id % group_by(id, individual) %>% summarize( tot= sum(value)) number_of_bar % group_by(group) %>% summarize( start= min(id), end= max(id) - empty_bar) %>% rowwise() %>% mutate( title= mean( c(start, end))) # prepare a data frame for grid (scales) grid_data <- base_data grid_data $end <- grid_data $end + 1 grid_data $start <- grid_data $start - 1 grid_data <- grid_data # Make the plot p <- ggplot(data) + # Add the stacked bar geom_bar( aes( x= as.factor(id), y=value, fill=observation), stat= 'identity', alpha= 0.5) + scale_fill_viridis( discrete= TRUE) + # Add a val=100/75/50/25 lines.