티스토리 뷰
참조: http://r.789695.n4.nabble.com/png-inside-loop-td3339526.html
참조: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f
루프 내에서 console이든 파일이든 출력하려면
그래프를 그릴 때 아래와 같은 코드에서
file_name=paste0("/home/sjlee/works/count.", date, "_merged.", width, "x", height,
".png")
png(file_name, width=width, height=height, units="px")
qplot(count_data$datetime, count_data$amount, colour=count_data$server, xlab="x label",
main="amount", margins=TRUE)
dev.off()
아래와 같이 print() 를 사용하시면 됩니다.
file_name=paste0("/home/sjlee/works/count.", date, "_merged.", width, "x", height,
".png")
png(file_name, width=width, height=height, units="px")
print(qplot(count_data$datetime, count_data$amount, colour=count_data$server, xlab="x label",
main="amount", margins=TRUE))
dev.off()
이 예에서는 qplot 함수를 사용하여 그리기 때문에 qplot 함수를 print로 랩핑했습니다.
- Total
- Today
- Yesterday
- Java
- Arrays
- OpenJDK6
- JavaMail
- OO3
- SimpleDateFormat
- GMT
- 다음팟인코더
- Linux
- IcedTea6
- smplayer
- output driver
- openoffice
- userguide
- Eclipse
- yum update
- tsclient
- PostgreSQL
- 출력드라이버
- Numbering
- Fedora 9
- 파란 화면을 보았니
- 리눅스
- xml2
- pl/java
- Fedora 8
- gl2
- 모토로이
- subervsion
- 병합정렬
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |