24小时热门版块排行榜    

查看: 7441  |  回复: 9
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

cotyer

银虫 (初入文坛)

[求助] 有关matlab中colorbar坐标刻度设置的问题 已有1人参与

我用axis tight自动显示刻度值,,为什么不能显示最大最小值呢?最大最小值的精度可以设置,我要精度很高;同时怎么设置N个刻度,并成等差分布。

有关matlab中colorbar坐标刻度设置的问题
UIL(2_HJ2(YZUUNQGN[3YIH.png
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

cotyer

银虫 (初入文坛)

引用回帖:
3楼: Originally posted by pdl9527 at 2016-11-25 17:59:51
function question_9
%2016-11-25
clear;clc
= peaks(30); %your input data
N=20; %the number of points you want
surf(X,Y,Z) % plot colormap(jet); %by changing jet to other variable (like hot, cool ...

还是出不来,我是用图像做的,所以结构体字段是不是应该加上double呢?
5楼2016-11-26 10:03:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 10 个回答

pdl9527

专家顾问 (小有名气)

【答案】应助回帖

感谢参与,应助指数 +1
CODE:
function question_9 %2016-11-25 clear;clc [X,Y,Z] = peaks(30); %your input data N=20; %the number of points you want surf(X,Y,Z) % plot colormap(jet); %by changing jet to other variable (like hot, cool and hsv) name you can change the style of the colormap [fmin fmax]=caxis; c=colorbar; c.Ticks=linspace(fmin,fmax,N)';

2楼2016-11-25 17:57:58
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

pdl9527

专家顾问 (小有名气)

【答案】应助回帖

CODE:
function question_9
%2016-11-25
clear;clc
[X,Y,Z] = peaks(30); %your input data
N=20; %the number of points you want
surf(X,Y,Z) % plot colormap(jet); %by changing jet to other variable (like hot, cool and hsv) name you can change the style
[fmin fmax]=caxis;
c=colorbar;
c.Ticks=linspace(fmin,fmax,N)';

3楼2016-11-25 17:59:51
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

pdl9527

专家顾问 (小有名气)

引用回帖:
5楼: Originally posted by cotyer at 2016-11-26 10:03:09
还是出不来,我是用图像做的,所以结构体字段是不是应该加上double呢?...

不太懂你的意思,你复制下面的代码到MATLAB,直接可以运行得到你要的效果,只要把输入改成你的数据就行了,还是不行你把你的数据贴上来。

function question_9
%2016-11-25
clear;clc
[X,Y,Z] = peaks(30); %your input data
N=20; %the number of points you want
surf(X,Y,Z) % plot
colormap(jet); %by changing jet to other variable (like hot, cool and hsv) name you can change the style
[fmin fmax]=caxis;
c=colorbar;
c.Ticks=linspace(fmin,fmax,N)';
6楼2016-11-26 17:54:08
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见