- 1、本文档共5页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
1 渐变1.1t=[linspace(0,2*pi) nan];x=sin(t);y=cos(2*t);z=sqrt(t);%所要绘制的曲线方程patch(x,y,z,z,edgecolor,flat,facecolor,none)view(3);grid on;colorbar1.2x=-200:5:200;y=-200:5:200;z=-200:5:200;m=linspace(0,1,length(x));for i=1:length(x);plot3(x(i),y(i),z(i),o,color,[m(i) 0 0])hold onend1.3 柱状图填色Matlab绘制彩色柱状图?(2012-09-28 12:58:34)转载▼标签:?彩色柱状图?杂谈分类:?Matlab首先,看一下效果图。默认条件下的柱状图颜色均为蓝色,现在可以绘制漂亮的柱状图以及渐变着色的柱状图。% 彩色柱状图%% 用到的数据n =?13;Z =?rand(n,1);%% 默认图片bar(Z);%% 简单的作图% 这个图根据数据列中值的大小着色。每列中的% 值越大,颜色越突出figureh=bar(Z);colormap(summer(n));ch =?get(h,Children);fvd =?get(ch,Faces);fvcd =?get(ch,FaceVertexCData);[~, izs]?=?sortrows(Z,1);for?i?=?1:nrow = izs(i);fvcd(fvd(row,:))?=?i;endset(ch,FaceVertexCData,fvcd)%% 更加漂亮的图片% 图片会以渐变的方式着色,效果非常不错figureh=bar(Z);ch =?get(h,Children);fvd =?get(ch,Faces);fvcd =?get(ch,FaceVertexCData);[zs, izs]?=?sortrows(Z,1);k =?128;?% 准备生成128 *3 行的colormapcolormap(summer(k));?% 这样会产生一个128 * 3的矩阵,分别代表[R G B]的值% 检视数据whos?ch fvd fvcd zs izs%%???Name???????Size????????????Bytes??Class?????Attributes%%???ch?????????1x1?????????????????8??double%???fvcd??????66x1???????????????528??double%???fvd???????13x4???????????????416??double%???izs???????13x1???????????????104??double%???zs????????13x1???????????????104??double%shading?interp?% Needed to graduate colorsfor?i?=?1:ncolor =?floor(k*i/n);?% 这里用取整函数获得color在colormap中行row = izs(i);?% Look up actual row # in datafvcd(fvd(row,1))?=?1;?% Color base vertices 1st indexfvcd(fvd(row,4))?=?1;fvcd(fvd(row,2))?= color;?% Assign top vertices colorfvcd(fvd(row,3))?= color;endset(ch,FaceVertexCData, fvcd);?% Apply the vertex coloringset(ch,EdgeColor,k)2 符号/线型/颜色/绘图标记 b blue . point - solid g green o circle : dotted r red x x-mark -. dashdot c cyan + plus -- dashed m magenta * star (none) no line y yellow s square k black d diamond
您可能关注的文档
- MATLAB作业3..doc
- MATLAB信号处理..doc
- Matlab傅立叶变换..doc
- MATLAB入门读本..doc
- Matlab函数名大全..doc
- matlab函数大全..doc
- MATLAB动画演示程序汇总..doc
- MATLAB去噪音处理..doc
- MATLAB参数估计与假设检验..doc
- matlab命令..doc
- 2024年中国钽材市场调查研究报告.docx
- 2024年中国不锈钢清洗车市场调查研究报告.docx
- 2024年中国分类垃圾箱市场调查研究报告.docx
- 2024年中国水气电磁阀市场调查研究报告.docx
- 2024年中国绿藻片市场调查研究报告.docx
- 2010-2023历年初中毕业升学考试(青海西宁卷)数学(带解析).docx
- 2010-2023历年福建厦门高一下学期质量检测地理卷.docx
- 2010-2023历年初中数学单元提优测试卷公式法(带解析).docx
- 2010-2023历年初中毕业升学考试(山东德州卷)化学(带解析).docx
- 2010-2023历年初中毕业升学考试(四川省泸州卷)化学(带解析).docx
最近下载
- My Life in China and America [容闳自传:我在中国和美国的生活].pdf
- 常熟银行研究报告:回归小微初心,乘风乡村振兴.doc VIP
- 浙商证券-宠物行业从乖宝宠物看宠物赛道:陪伴需求催化宠物新蓝海,食品赛道频现龙头.pdf
- ctgd-sop v5风口安装作业指导书.pdf VIP
- 消化道出血有关试题附有答案.docx VIP
- 湘教版美术《家乡的古建筑》说课稿.doc
- 上海地区不同垂直骨面型成人临床冠中心高度的比较研究.pdf VIP
- 2023年 AMC 10B 数学竞赛(原卷+答案).doc VIP
- 世界贸易组织.ppt VIP
- 2023年 AMC 10A 数学竞赛(原卷+答案).doc
文档评论(0)