How to keep logarithmic scaling constant between multiple graphs?
3 次查看(过去 30 天)
显示 更早的评论
Dear all,
For a research project I want to display a relatively large matrix (1435x1435) that has coefficients between 0 and 1. I want to do this using the mesh command. The code I am using is at follows:
figure('WindowState','maximized',...
'Colormap',flip(hot));
% Create axes
axes1 = axes;
hold(axes1,'on');
% Create mesh
graph=mesh(Y1995);
view(axes1,[73.6250000000001 76.6295541401274]);
grid(axes1,'on');
hold(axes1,'off');
% Set the remaining axes properties
set(axes1,'ColorScale','log','XTick',[1 1435],'YTick',[1 1435],'ZTick',...
[0.2 0.4 0.6 0.8 1.0]);
xlim([1 1435])
ylim([1 1435])
zlim([0 1])
figure('WindowState','maximized',...
'Colormap',flip(hot));
% Create axes
axes1 = axes;
hold(axes1,'on');
% Create mesh
graph=mesh(Y2009);
view(axes1,[73.6250000000001 76.6295541401274]);
grid(axes1,'on');
hold(axes1,'off');
% Set the remaining axes properties
set(axes1,'ColorScale','log','XTick',[1 1435],'YTick',[1 1435],'ZTick',...
[0.2 0.4 0.6 0.8 1.0]);
xlim([1 1435])
ylim([1 1435])
zlim([0 1])
Ideally I would want this for the period 1995-2009. However, the problem currently is that the log scaling I want to apply is different for each graph. Because the values of the elements in Y1995 are on average much smaller than those in Y2009, the log scaling applies differently to each graph. This means that the changes in the values of each element in the matrix seem much smaller than they actually are.
Is there a way to uniformly apply the log scaling to each graph? Right now my graph applies the log scaling individually to each graph, which means the picture the graphs paint is distorted (i.e. they cannot be uniformly compared).
Unfortunately the dataset is too large to be appended.
Thanks in advance!
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!