plotting stacked bar plot with different number and kinds of variables
Hi,
I am trying to create a stacked bar plot using the data below. I want to show A, C and D on the x axis. "A" has four variables (GCU,GCC,GCA,GCG) and I want to show these variables as a stacked bar with their percentages (as shown in the last column). I tried to use ggplot but could not make it. Any help will be appreciated.
• 1,458 views
•
link
1 answer
It shouldnt be too difficult using ggplot2, but try the R package ggpubr for something more user friendly.
ggbarplot(data = mat , x = "code", y = "percent", fill = "codon" )
• 0 views
•
link
Log in to answer this question.
Please do not paste screenshots of plain text content, it is counterproductive. You can copy paste the content directly here (using the code formatting option shown below), or use a GitHub Gist if the content volume exceeds allowed length here.
Thanks for the information. I did not know this option.
I am going to use it for my new posts.