上一页 1 ··· 315 316 317 318 319 320 321 322 323 ··· 385 下一页
摘要: 1、测试数据 > a <- c(3,2,2,2,2,2,9,1,4) > b <- c(7,8,4,4,4,6,5,2,3) > c <- c(3,5,7,4,3,2,1,8,6) > d <- data.frame(a, b, c) > d a b c 1 3 7 3 2 2 8 5 3 2 4 阅读全文
posted @ 2021-04-17 11:49 小鲨鱼2018 阅读(3165) 评论(0) 推荐(0) 编辑
摘要: 1、 opar <- par(no.readonly = T) par(fig=c(0,0.8,0,0.8)) plot(mtcars$wt,mtcars$mpg) par(fig=c(0,0.8,0.60,1),new= T) boxplot(mtcars$wt,axes = F,horizont 阅读全文
posted @ 2021-04-16 19:10 小鲨鱼2018 阅读(739) 评论(0) 推荐(0) 编辑
摘要: 1、 attach(mtcars) layout(matrix(c(1,1,2,3), 2, 2, byrow=T)) hist(wt) hist(mpg) hist(disp) detach(mtcars) 2、 attach(mtcars) layout(matrix(c(1,2,3,3),2, 阅读全文
posted @ 2021-04-16 18:11 小鲨鱼2018 阅读(1915) 评论(0) 推荐(0) 编辑
摘要: 1、 par(mfrow=c(3,2)) plot(1:10) text(1,5,"aa", cex = 2,col = "red") plot(1:10) text(5,5,"bb",cex = 2, col = "blue") plot(1:10) text(5,5, "cc", cex = 2 阅读全文
posted @ 2021-04-16 17:16 小鲨鱼2018 阅读(1592) 评论(0) 推荐(0) 编辑
摘要: 1、 > plot(1:10) > locator(1) ## 此时鼠标点击图形中位置,将返回位置坐标 $x [1] 2.202362 $y [1] 7.89666 > text(locator(1),"xxx",cex = 2,col="red") ## 结合text函数,可以图形中添加文本 > 阅读全文
posted @ 2021-04-16 16:49 小鲨鱼2018 阅读(3041) 评论(0) 推荐(0) 编辑
摘要: 1、 opar <- par(no.readonly = T) par(mfrow=c(2,2)) plot(1:10) legend("topleft",inset = 0.04,c(paste0("lab", 1:4)),pch = c(15:18), col = c("red","blue", 阅读全文
posted @ 2021-04-16 16:31 小鲨鱼2018 阅读(4881) 评论(0) 推荐(0) 编辑
摘要: 1、 plot(1:10) abline(h=5,col="red",lty=2,lwd = 3) 2、 plot(1:10) abline(h=c(2,4,6),col="red",lwd=3) 3、 plot(1:10) abline(v=c(2,4,8), col = "blue", lwd 阅读全文
posted @ 2021-04-16 15:43 小鲨鱼2018 阅读(1761) 评论(0) 推荐(0) 编辑
摘要: 1、 library(Hmisc) opar <- par(no.readonly = T) par(mfrow=c(1,2)) plot(1:10) plot(1:10) minor.tick(nx=2,ny=3,tick.ratio = 0.5) par(opar) 2、 library(Hmi 阅读全文
posted @ 2021-04-16 12:19 小鲨鱼2018 阅读(561) 评论(0) 推荐(0) 编辑
摘要: 1、去除外围框线 opar <- par(no.readonly = T) par(mfrow = c(2,1)) plot(1:10) plot(1:10, axes = F) par(opar) 2、去除x轴标线 opar <- par(no.readonly = T) par(mfrow = 阅读全文
posted @ 2021-04-16 11:52 小鲨鱼2018 阅读(5834) 评论(0) 推荐(0) 编辑
摘要: 1、 [root@centos7 test]# ls a.txt [root@centos7 test]# cat a.txt i e s m u w e i p q x z u n k e c b v y [root@centos7 test]# sed 's/.$//' a.txt i e s 阅读全文
posted @ 2021-04-16 09:14 小鲨鱼2018 阅读(1849) 评论(0) 推荐(0) 编辑
上一页 1 ··· 315 316 317 318 319 320 321 322 323 ··· 385 下一页