Cat22Table <- data.frame(
Hvernig = c("Gamladags", "Stapnadur", "Spilltan", "Mengandi", "Skapar verdmaeti fyrir faa", "Lagt menntunarstig"),
"1-2" = c(19., 15.9, 55.8, 31.2, 51.9, 13.6),
"3-5" = c(46.4, 56.0, 35.5, 59.2, 35.5, 71.9),
"6-7" = c(34.6, 28.1, 8.7, 9.6, 12.6, 14.5)
)
Cat22Visual <- Cat22Table %>%
ggplot(
Data = Cat22Table,
aes(y = Hvernig),
position_stack(1),
) +
geom_bar(
aes(
weight = X1.2,
fill = "1-2"
),
alpha = 1
) +
geom_bar(
aes(
weight = X3.5,
fill = "3-5"
),
alpha = 1
) +
geom_bar(
aes(
weight = X6.7,
fill = "6-7"
),
alpha = 1,
) +
labs(
title = "Hvernig metur þú orðapör?",
subtitle = "(percent)",
x = "percent",
fill= "Response")
Cat22Visual