Skip to content

Instantly share code, notes, and snippets.

@CaptainJH
Created March 24, 2014 07:41
Show Gist options
  • Save CaptainJH/9735770 to your computer and use it in GitHub Desktop.
Save CaptainJH/9735770 to your computer and use it in GitHub Desktop.
R 的一些基本画图功能
lx = c(1:9)
ly = c(10:18)
#pdf 的单位应该是inch
#pdf("D:/firstpdf.pdf", width=100, height=10)
# png 的单位是像素
png("D:/firstpng.png", width=640, height=1280)
opar <- par(no.readonly = TRUE)
par(mfrow=c(3, 1))
plot(lx, ly)
plot(ly, lx)
plot(lx, lx)
par(opar)
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment