R 기초; 그래픽 - 그래프 배치
plot(faithful, pch=19, col="blue", main="Old Faithful Geyser", sub="Yellowstone National Park", xlab="Eruption time (minutes)", ylab="waiting time (minutes)")
plot(pressure, type="l", col="red", main="Temperature vs. Pressure")
plot(LakeHuron, col="green", lwd=2, main="Lake Huron Level")
plot(ToothGrowth$supp, ToothGrowth$len, col="orange", main="Tooth Growth of Guinea Pig")
windows()
windows(width=12, height=8)
plot(faithful, pch=19, col="blue", main="Old Faithful Geyser", sub="Yellowstone National Park", xlab="Eruption time (minutes)", ylab="waiting time (minutes)")
par("mai")
par(mai=c(1, 0.5, 1, 0.2))
par("mar")
old.par <- par(mai=c(1, 0.5, 1, 0.2))
par("mai")
par(old.par)
par("mai")
par("mar")
old.par <- par(mar=c(5,4,4,2) + 0.2)
par("mar")
par(old.par)
par("mar")
x1 <- 1:10
y1 <- log(x1)
x2 <- 1:10
y2 <- sqrt(x2)
plot(x1, y1, type="l", col="red", xlab="X", ylab="Y")
lines(x2, y2, lty="dashed", col="blue")
range(y1)
range(y2)
xlim <- range(c(x1, x2))
ylim <- range(c(y1, y2))
plot(x1, y1, xlim=xlim, ylim=ylim, type="l", col="red", xlab="X", ylab="Y")
lines(x2, y2, lty="dashed", col="blue")
par("mfrow")
old.par <- par(mfrow=c(2, 2))
par("mfrow")
plot(faithful, pch=19, col="blue", main="First")
plot(pressure, pch=19, col="red", main="Second")
plot(LakeHuron, pch=19, col="green", main="Third")
plot(ToothGrowth$supp, pch=19, col="orange", main="Fourth")
'공부 > R Programming' 카테고리의 다른 글
R 기초; ggplot2 그래픽1 - 구조와 그래프 생성 (0) | 2021.01.24 |
---|---|
R 기초 - 그래픽 - 그래프 요소 추가 (0) | 2021.01.24 |
R 기초; 그래픽 - 그래프 패러미터 설정 (0) | 2021.01.23 |
R 기초; 그래픽 - 그래프 생성 및 저장 (0) | 2021.01.23 |
R 기초; 고수준 및 저수준 그래픽 함수 (0) | 2021.01.23 |
댓글