物探论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1170|回复: 0

[算法] 图像增强

[复制链接]
发表于 2013-11-24 09:52:43 | 显示全部楼层 |阅读模式
CONTOURFCMAP Filled contour plot with specified colors

  h = contourfcmap(x,y,z,clev,cmap,lo,hi,cbarloc)
  h = contourfcmap(x,y,z,clev,cmap)
  h = contourfcmap(x,y,z,clev,cmap,lo)
  h = contourfcmap(x,y,z,clev,cmap,lo,hi)

  This function creates a shaded contour map, similar to that created by
  the contourf function.  However, the relationship between a contourf plot
  and it's colormap (i.e. exactly which color corresponds to each contour
  interval), can often be confusing and inconsistent, in my opinion.  This
  function instead allows the user to specify exactly which colors to use
  in each interval, and also to choose colors for regions that exceed the
  contour line limits.

  Input variables

    x:          x-coordinates of grid, following size restrictions of surf
                command

    y:          y-coordinates of grid, following size restrictions of surf
                command

    z:          array of data to be contoured, following size restritions
                of surf command

    clev:       vector of length n, contour levels, must be monotonically
                increasing

    cmap:       n-1 x 3 colormap array, specifying colors used to shade
                each contour interval

    lo:         1 x 3 colormap array, specifying color used for all data
                falling below the first contour level.  If not included or
                empty, default will be to white.

    hi:         1 x 3 colormap array, specifying color used for all data
                falling above the last contour level.  If not included or
                empty, default will be to white.

    cbarloc:    string specifying colorbar location (see colorbar),  or a
                1 x 4 position vector for colorbar.  If not included, no
                colorbar will be created.  Note that the colorbar created
                is not a colorbar object, but just an axis with plotted
                patches; it is for labeling only and is not linked to the
                "peer axis" in any way.

  Output variables:

    h:          1 x 1 structure

                c:      contour matrix for filled contour plot

                h:      handle to contourgroup

                cbax:   handle to axis of colorbar

  Example:

  [x,y] = meshgrid(linspace(0,1,100));
  z = peaks(100);
  contourfcmap(x,y,z,[-5 -3 -2:.5:2 3 5],jet(12), ...
               [.8 .8 .8], [.2 .2 .2], 'eastoutside') 1.jpg contourfcmap.zip (3.28 KB, 下载次数: 0, 售价: 2 物探币)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|物探论坛 ( 鄂ICP备12002012号 微信号:iwutan )

GMT+8, 2024-4-29 06:07 , Processed in 0.074055 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表