I have enough! Please someone helping me to solve this. (is it use coord_flip ???)

I need to flip these plot bar like below :

These my R command :

Number<- c(32.4, 37.0, 21.3, 9.3)
barplot(Number)
barplot(Number, names.arg=c("Minyak Sayur", "Beras", "Terigu", "Kecap"), xlab="Barang", ylab="Persentase", main="Penjualan", col="Green")

Does anyone can help me to solve this ?

Try setting horiz = TRUE.

Number<- c(32.4, 37.0, 21.3, 9.3)
barplot(Number)
barplot(Number, horiz=TRUE, names.arg=c("Minyak Sayur", "Beras", "Terigu", "Kecap"), 
        xlab="Barang", ylab="Persentase", main="Penjualan", col="Green")  
1 Like

Got it !!. Thank you so much. dude i appreciate it.
Keep safe & healthy . Love you dudeeeeeeee......

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.