How i can add custom labels onto bar plot?
Here is my code:
#appearance
H <- c(6.36, 3.03, 6.85, 4.07, 4.69, 6.27, 6.67, 3.11, 5.07, 6.14, 5.93, 6.49)
par(mar = c(3, 5.5, 0.5, 2))
barplot(H,
xlab = "",
ylab = "",
xlim = c(0, 9),
names.arg = c("Russian Banana", "Vermillion", "Atlantic", "POR12PG28-3", "Valery",
"Rio Colorado", "CO99076-6R", "Purple Majesty", "AC99330-1P/Y",
"CO05068-1RU", "Masquerade", "Canela Russet"),
col = colorRampPalette(c("#6E5773","pink"))(12),
font.axis = 2,
cex.names = .7,
cex.axis = .5,
horiz = TRUE, las=1, font.lab=1, font.axis=1, border = NA)
abline(v=7, col = "magenta", lty = 5)
text(6.36, "ab", pos = 2)
text(3.03, "e", pos = 2)
text(6.85, "a", pos = 2)
text(4.07, "d", pos = 2)
text(4.69, "cd", pos = 2)
text(6.27, "ab", pos = 2)
text(6.67, "ab", pos = 2)
text(3.11, "e", pos = 2)
text(5.07, "c", pos = 2)
text(6.14, "ab", pos = 2)
text(5.93, "b", pos = 2)
text(6.49, "ab", pos = 2)
axis(side = 1, at = 1:9,
labels = c("Dislike\nExtremely", "", "3", "", "5", "", "7", "", "Like\nExtremely"),
cex.axis = .5)
Created on 2020-07-15 by the reprex package (v0.3.0)