Here is my code. However, it outputs a very tall barplot and I want to shrink this VERTICALLY, not horizontally. I am a beginner in R, so any help would be great! Below is sample data.
SLC4A1domain <- read.csv(file.choose(), header=TRUE)
SLC4A1barplot <- barplot(as.matrix(SLC4A1domain), horiz=TRUE, xlab = "Length (Protein Domains Shown)",
main = "Gene Data", col=c("azure", "plum1", "skyblue"),
legend = c("Cytoplasmic", "Helical Membrane", "Extracellular"))
Sample data, I imported from google sheets as a csv, one column.
structure(list(SLC4A1 = c(1209L, 72L, 24L, 0L, 63L, 0L, 9L, 51L,
27L, 0L, 63L, 0L, 36L, 69L, 87L, 0L, 63L, 0L, 33L, 63L, 120L,
0L, 63L, 0L, 48L, 57L, 0L, 0L, 54L, 0L, 69L, 63L, 0L, 0L, 57L,
0L, 114L, 93L, 0L, 126L, 0L, 0L)), row.names = c(NA, 42L), class = "data.frame")