I'm using the likert package by jbryer and want to visualise the data with stacked bar plots. The size/width of these bar plots depends on how many bars are in the graph, i.e. with only one bar the bar is pretty wide, while they get thinner the more bars are plotted.
I'd like to costumly set the size/width of the bar, so that they stay the same, no matter how many bars are plotted in the graph, i.e. that the bar size is the same for the plots of l29_5 and l29_2.
library(ggplot)
library(likert)
data(pisaitems)
items29_5 <- pisaitems[,substr(names(pisaitems), 1,5) == 'ST25Q']
colnames(items29_5) <- c("Magazines", "Comic books", "Fiction",
"Non-fiction books", "Newspapers")
items29_2 <- items29_5 %>%
select("Magazines", "Comic books")
l29_5 <- likert(items29_5)
l29_2 <- likert(items29_2)
plot(l29_5)
plot(l29_2)