zoukankan      html  css  js  c++  java
  • R语言中控制绘图面板中绘图数目

    1、一般绘图

    > plot(0:10)

    2、利用mfrow参数设置

    par(mfrow = c(1,2))   ## 设置为一行两列
    plot(0:10)
    plot(0:10)

    > dev.off()  ## 清空设置
    null device 
              1 
    > par(mfrow = c(1,4))   ## 设置为1行4列
    > plot(0:10)
    > plot(0:10)
    > plot(0:10)
    > plot(0:10)
    > dev.off()     ## 清空设置
    null device 
              1 

    > par(mfrow = c(2,4))    ## 设置为2行4列
    > plot(0:10)
    > plot(0:10)
    > plot(0:10)
    > plot(0:10)
    > plot(0:10)
    > plot(0:10)
    > plot(0:10)
    > plot(0:10)
    > dev.off()          ##关闭绘图
    null device 
              1 

    3、利用mfrow VS mfcol

    mfrow:先行后列

    > par(mfrow = c(2,2))     ## 设置为两行两列
    > plot(0:10, main = "1111")
    > plot(0:10, main = "2222")
    > plot(0:10, main = "3333")
    > plot(0:10, main = "4444")
    > dev.off()               ## 关闭绘图
    null device 
              1 

    mfcol: 先列后行

    > par(mfcol = c(2,2))
    > plot(0:10, main = "1111")
    > plot(0:10, main = "2222")
    > plot(0:10, main = "3333")
    > plot(0:10, main = "4444")
    > dev.off()
    null device 
              1 

  • 相关阅读:
    Cmder配置
    uboot移植
    嵌入式产品开发技术问题
    flexbox布局
    使用PS过程
    STM32 使用 FreeRTOS过程记录
    TTL、RS232、RS485、串口
    用纯css改变下拉列表select框的默认样式
    task9暂存
    Hello World
  • 原文地址:https://www.cnblogs.com/liujiaxin2018/p/15819718.html
Copyright © 2011-2022 走看看