Mathematica中文论坛-非官方

标题: 豆粑粑 matlab 画黑白colormap [打印本页]

作者: meatball1982    时间: 2017-8-8 19:04
标题: 豆粑粑 matlab 画黑白colormap

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, 下载次数: 924)

fig_panda_colmap.png





欢迎光临 Mathematica中文论坛-非官方 (http://ilovemathematica.com/) Powered by Discuz! X3.2