I have tried to create a 100% stacked bar chart in rstudio but haven't found a way that works yet (also tried with "position", but r somehow doest recognize that)
Right now my code looks like that:
ggplot(andmed, aes(x= eesmärk, group = Class)) +
geom_bar(aes(fill = factor(Class))) +
scale_fill_brewer(type = "div", palette = 2) +
labs(x = "eesmärk/kaaslane", y = "protsent", fill="Klass") +
ggtitle("...")
(a normal bar chart graph.a pic of what it looks like) Would like it to look similar to that:(but this one was made in SAS)how i would like it to look like