zoukankan      html  css  js  c++  java
  • 将矩阵数据转换为栅格图 filled.contour()

    require(grDevices) # for colours

    filled.contour(volcano, color = terrain.colors, asp = 1) # simple

    x <- 10*1:nrow(volcano)
    y <- 10*1:ncol(volcano)
    filled.contour(x, y, volcano, color = terrain.colors,
    plot.title = title(main = "The Topography of Maunga Whau",
    xlab = "Meters North", ylab = "Meters West"),
    plot.axes = { axis(1, seq(100, 800, by = 100))
    axis(2, seq(100, 600, by = 100)) },
    key.title = title(main = "Height (meters)"),
    key.axes = axis(4, seq(90, 190, by = 10)))

    # Annotating a filled contour plot
    a <- expand.grid(1:20, 1:20)
    b <- matrix(a[,1] + a[,2], 20)
    filled.contour(x = 1:20, y = 1:20, z = b,
    plot.axes = { axis(1); axis(2); points(10, 10) })

    x <- y <- seq(-4*pi, 4*pi, len = 27)
    r <- sqrt(outer(x^2, y^2, "+"))
    filled.contour(cos(r^2)*exp(-r/(2*pi)), axes = FALSE)
    ## rather, the key *should* be labeled:
    filled.contour(cos(r^2)*exp(-r/(2*pi)), frame.plot = FALSE,
    plot.axes = {})

  • 相关阅读:
    APP兼容性测试
    APP本地服务安全测试
    接口安全测试
    Python之日志操作(logging)
    Python之json编码
    Python之配置文件读写
    windows10 修改远程连接本地端口
    ctf学习
    telnet常见的错误
    连接ssh中常见的错误代码
  • 原文地址:https://www.cnblogs.com/arcserver/p/6437776.html
Copyright © 2011-2022 走看看