Mathematica中文论坛-非官方

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 8975|回复: 0
打印 上一主题 下一主题

豆粑粑 matlab 画黑白colormap

[复制链接]

532

主题

602

帖子

3031

积分

论坛元老

Rank: 8Rank: 8

积分
3031
跳转到指定楼层
楼主
发表于 2017-8-8 19:04:05 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

matlab .
surf with the panada colormap
black-white-black-white- ......

  1. clear all
  2. clc
  3. clf

  4. [x,y,z]=peaks(100);

  5. col_gray=gray(60);
  6. col_mm=[];
  7. for i=1:10
  8.     col_mm=[col_mm;
  9.             col_gray;
  10.             flipud(col_gray)];
  11. end

  12. h1=subplot(2,2,1)
  13. surf(x,y,z,'edgecolor','none')
  14. colormap(h1,'jet')
  15. view(0,90)
  16. axis tight

  17. h2=subplot(2,2,2)
  18. surf(x,y,z,'edgecolor','none')
  19. shading interp
  20. colormap(h2,gray)
  21. view(0,90)
  22. axis tight

  23. h3=subplot(2,2,3)
  24. surf(x,y,z,'edgecolor','none','FaceColor','interp','FaceLighting','gouraud')
  25. camlight left

  26. shading interp
  27. colormap(h3,col_mm)
  28. view(0,90)
  29. axis tight

  30. h4=subplot(2,2,4)
  31. surf(x,y,z,'edgecolor','none','FaceColor','interp')
  32. colormap(h4,col_mm)
  33. view(0,90)
  34. axis tight
复制代码


fig_panda_colmap.png (232.16 KB, 下载次数: 841)

fig_panda_colmap.png
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|小黑屋|Mathematica中文论坛-非官方 ( 辽ICP备16001491号-1

GMT+8, 2024-4-28 01:25 , Processed in 0.122328 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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