• R语言中layout图形布局函数


    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,2,byrow = T))
    hist(wt)
    hist(mpg)
    hist(disp)
    detach(mtcars)

    3、

    layout(matrix(c(1,1,2,3),2,2,byrow = F))
    plot(1:10)
    plot(1:10)
    plot(1:10)

    4、

    layout(matrix(c(1,2,3,3), nrow = 2, ncol = 2,byrow = F))
    plot(1:10)
    plot(1:10)
    plot(1:10)

    5、

    layout(matrix(c(1,2,3,3,3,3), nrow = 3, ncol = 2, byrow = T))
    plot(1:10)
    plot(1:10)
    plot(1:10)

    6、

    layout(matrix(c(1,2,3,4,4,4),3,2,byrow = F))
    plot(1:10)
    plot(1:10)
    plot(1:10)
    plot(1:10)

    7、

    layout(matrix(c(1,2,2,3,3,3),3,2,byrow = F))
    plot(1:10)
    plot(1:10)
    plot(1:10)

    8、

    layout(matrix(c(1,2,3,2,3,4),3,2,byrow = T))
    plot(1:10)
    plot(1:10)
    plot(1:10)
    plot(1:10)

    9、

    attach(mtcars)
    layout(matrix(c(1,1,2,3),2,2,byrow = T), widths = c(3,1),heights = c(1,2))
    hist(wt)
    hist(mpg)
    hist(disp)
    detach(mtcars)

    10、

    layout(matrix(c(1,1,2,3),2,2,byrow = F),widths = c(1:3),heights = c(3:1))
    plot(1:10)
    plot(1:10)
    plot(1:10)

    11、

    layout(matrix(c(1,1,2,3,2,4),3,2,byrow = T), heights = c(1:2,2),
           widths = c(1:2) )
    plot(1:10)
    plot(1:10)
    plot(1:10)
    plot(1:10)

  • 相关阅读:
    java包装类的缓存机制(转)
    分布式事务的思考(转)
    分布式事务框架介绍与使用案例
    java 内部类、匿名内部类
    spring cloud应用
    Oralce学习笔记(六)
    部署CentOS虚拟机集群
    商品详情页系统架构
    Oracle学习笔记(五)
    hystrix完成对redis访问的资源隔离
  • 原文地址:https://www.cnblogs.com/liujiaxin2018/p/14668259.html
Copyright © 2020-2023  润新知