Tout d'abord, créez les données pour le graphique
H <- c(1.964138757, 1.729143013, 1.713273714, 1.706771799, 1.67977205)
M <- c("SP105", "SP30", "SP244", "SP31", "SP147")
Deuxièmement, donnez le nom d'un fichier graphique
png(file = "Bargraph.jpeg", width = 500, height = 300)
Troisièmement, tracez le graphique à barres
barplot(H,names.arg=M,ylab="Degree ", col= rainbow(5), las=2, border = 0, cex.lab=1, cex.axis=1, font=1,col.axis="black")
title(xlab="Service Providers", line=4, cex.lab=1)
Enfin, enregistrez le fichier
dev.off()
Sortie :
1 votes
Voir cran.r-project.org/doc/FAQ/