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 

  • 相关阅读:
    SpringBoot介绍
    linux运行jar以及vi
    linux文件命名
    数据库 mysql
    SSM框架-Spring
    SSM框架-mybatis
    SSM框架-SpringMVC
    设计模式-策略模式
    设计模式-单例模式
    Java多线程实现和JUC介绍
  • 原文地址:https://www.cnblogs.com/liujiaxin2018/p/15819718.html
Copyright © 2011-2022 走看看