0
변수 "my.data $ V2"(y 축)와 날짜 "my.data $ V3"(x 축)로 구성된 두 개의 데이터 프레임 열을 플롯해야합니다)는 문자열입니다. 기본 플롯과 ggplot 접근법을 사용해 보았지만 작동시키지 못했습니다.R - 플롯 값 대 문자 날짜
plot(my.data$V2,my.data$V3,xaxt="n",ylab="Volum") #don't plot the x axis
axis.POSIXct(1, at=seq(my.data$V3[1], my.data$V3[2], by="month"), format="%b") #label the x axis by months
require(ggplot2)
theme_set(theme_bw()) # Change the theme to my preference
ggplot(aes(x = my.data$V3, y = my.data$V2), data = my.data) + geom_point()
Here 데이터 세트를 찾을 수 있습니다.
plot(strptime(my.data$V3,"%d/%m/%YT%H:%M:%S",tz="GMT"),my.data$V2, xlab="Time", ylab="Volum")
는 별개의 대답에 솔루션을 추가 + 제목에 해결 추가하지 마십시오, 우리는 해결책이 당신을 위해 일을 나타 내기 허용 대답이있다. –