Does customizing colormap manipulates interpretation of a plot to a reader?
1 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1497879/image.png)
I plotted this picture with a following code, i have used colormap jet. But since, this is all coming out to be green. what if i customise the colormap by setting min max -5 5, then the picture is more colourful and nice, but does that imply i'm manipulating the picture for readers to interpret just to get better colours?
syms z r theta n m
X(z)=atan(z)
Y(z)=z/(z^2 + 1)
Z(z)=sym(1/2) - 1/(2*(z^2 + 1))
X(r,theta)=subs(X,z,r*exp(1i*theta))
Y(r,theta)=subs(Y,z,r*exp(1i*theta))
Z(r,theta)=subs(Z,z,r*exp(1i*theta))
figure
fsurf(real(X),imag(Y),2*imag(Z),[0 0.999 0 2*pi],'MeshDensity',25,'FaceAlpha',.75)
colormap jet
shading interp
axis([-1.3 1.3 -1.3 1.3 -1.5 1.5])
view([35 35 90])
box on
BoxStyle='full';
set(gcf,'renderer','Painters')
采纳的回答
dpb
2023-9-30
编辑:dpb
2023-9-30
syms z r theta n m
X(z)=atan(z);
Y(z)=z/(z^2 + 1);
Z(z)=sym(1/2) - 1/(2*(z^2 + 1));
X(r,theta)=subs(X,z,r*exp(1i*theta));
Y(r,theta)=subs(Y,z,r*exp(1i*theta));
Z(r,theta)=subs(Z,z,r*exp(1i*theta));
figure
fsurf(real(X),imag(Y),2*imag(Z),[0 0.999 0 2*pi],'MeshDensity',25,'FaceAlpha',.75)
colormap jet
shading interp
%axis([-1.3 1.3 -1.3 1.3 -1.5 1.5])
view([35 35 90])
box on
BoxStyle='full';
%set(gcf,'renderer','Painters')
If you don't constrain the view to the very limited section, then the full colormap shows up -- so, in one sense the answer to the question is "yes".
But, if all you present is the constrained range, then it doesn't really matter; that range will shown on the axes and, presuming you were to include a colorbar, would illustrate the matching color range/magnitude to go with it.
My personal opinion would be it would only be unfair if you presented both at the same time with differing colormaps (and even there, that wouldn't neceessarily be falsely representing the data if the tighter range was noted as using expanded color map to make more visible variations).
Also Nota Bene:
figure
fsurf(real(X),imag(Y),2*imag(Z),[-1 1 -1 1],'MeshDensity',25,'FaceAlpha',.75)
colormap jet
shading interp
%axis([-1.3 1.3 -1.3 1.3 -1.5 1.5])
view([35 35 90])
box on
If you were to constrain the plotting region (as done artificially above), then the colormap will scale to that range. That might be the way you would want to approach it instead -- generate the surface but then restrict the region that you plot.
3 个评论
dpb
2023-10-1
Correct, it was just for illustration of how the color map fits to the range of the given figure values...
更多回答(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!