Say I have a dataframe where the rows correspond to samples and each column corresponds to how often some molecule appears in the sample. How do I create a plot so that each molecule name is on the x axis and how often it appears in each sample on the y axis.
For example:
temp <- data.frame(mol1 = c(0.2,0.3,0.5),
mol2 = c(0.4,0.7,0.3),
mol3 = c(0.1, 0, 0.8))
rownames(temp) <- c("S1", "S2", "S3")
There would be a tick for "mol1" on the x-axis with the values 0.2, 0.3, and 0.5 above it labeled or with a legend. The same for the other molecules.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.