티스토리 뷰
참조: 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
- yum update
- subervsion
- userguide
- Fedora 9
- OO3
- smplayer
- 모토로이
- xml2
- Fedora 8
- Numbering
- IcedTea6
- gl2
- PostgreSQL
- 파란 화면을 보았니
- JavaMail
- Java
- 병합정렬
- SimpleDateFormat
- pl/java
- 출력드라이버
- 다음팟인코더
- 리눅스
- GMT
- Arrays
- OpenJDK6
- tsclient
- output driver
- openoffice
- Eclipse
- Linux
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |