I need help with a bar chart in R. I did not find exactly what I was looking for using the search function.
I have to compare the European unemployment rate in an empirical work. I managed to get the basic structure right. Unfortunately, I didn't manage to get the corresponding values behind the horizontal bars. I have attached a picture of what it should look like in the end (red values)
options(stringsAsFactors = F)
ewq<- read.table(file='Europa.txt', header=TRUE, sep = ';')
attach(ewq)
par(mar=c(5,10,2,2))
barplot(Wert3, names.arg = Land,
horiz=T,
main= "Erwerbslosenquote in ausgewählten EU-Ländern",
cex.names=0.8,
xlim=c(0,20),
ylim=c(0,19),
col= c("honeydew3", "honeydew3","honeydew3","honeydew3","azure","honeydew3",
"honeydew3","honeydew3","honeydew3","honeydew3","honeydew3","honeydew3",
"honeydew3","honeydew3","deeppink","honeydew3"),
xlab= "Erwerbslosenquote in Prozent [Stand: Okt. 2019]",
las=1)
My Data:
Land;Wert3
Griechenland (EU-Max);16.7
Spanien;14.2
Italien;9.7
Frankreich;8.5
Europa;6.8
Schweden;6.8
Portugal;6.5
Litauen;6.4
Irland;4.8
Österreich;4.6
Rumänien;4
Vereinigtes Königreich;3.8
Niederlande;3.5
Polen;3.2
Deutschland;3.1
Tschechien (EU-Min);2.2
This is what it should look like
Maybe you also have a tip how I could solve the thing with the colors more elegantly. But it's not that important :-D
I don't know if it's relevant, but I use R-Studio on the macOS Catalina. Thanks a lot!( Sorry, I'm not an expert at all!:) )