我想用2D格式的2个变量表示数据.该值由颜色表示,2个变量表示为2轴.我使用contourf函数绘制我的数据:
clc; clear;
load('dataM.mat')
cMap=jet(256); %set the colomap using the "jet" scale
F2=figure(1);
[c,h]=contourf(xrow,ycol,BDmatrix,50);
set(h, 'edgecolor','none');
xlim([0.0352 0.3872]);
ylim([0.0352 0.3872]);
colormap(cMap);
cb=colorbar;
caxis([0.7 0.96]);
% box on;
hold on;
Run Code Online (Sandbox Code Playgroud)
xrow和ycol都是6x6矩阵,代表坐标.BDmatrix是表示相应数据的6x6矩阵.但是,我得到的是:
以下是xrow和yrow matices:
以下是BDmatrix的内容:
轮廓颜色是否可以平滑变化而不是作为连接数据点的直线出现?这个数字的问题是粗粒度,这是不吸引人的.我试图用imagec替换contourf,但似乎无法正常工作.我正在使用MATLAB R2015b.