.csv ファイルに次のデータがあります。
Name marks1 marks2
xy 10 30
yz 20 40
zx 30 40
vx 20 20
vt 10 20
marks1
とmarks2
を Y 軸に、名前を X 軸に使用してグラフを描画するにはどうすればよいですか?
y <- cbind(data$marks1,data$marks2)
x <- cbind(data$Name)
matplot(x,y,type="p")
棒グラフが必要ですが、大量の x 軸データがあるため、それらを適切に配置し、数値を配置する必要があります
たとえば、グラフは次のようになります
マーク 1 マーク 2 が同じバーに 2 つの異なる色で表示され、それらにマークが書かれている
#read csv file
aau <- read.csv("",head=TRUE,sep=",")
#convert into matrix format
aaumatrix <- as.matrix(aau)
#create barplot
barplot(aaumatrix)
#check for more attributes of barplot
?barplot