Does customizing colormap manipulates interpretation of a plot to a reader?

조회 수: 2 (최근 30일)
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
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
dpb 2023년 10월 1일
Correct, it was just for illustration of how the color map fits to the range of the given figure values...
simran
simran 2023년 10월 1일
Hey, can you help with how can I manipulate r and theta in above so that the domain is now right half plane instead of the standard unit disk? And if not manipulating r and theta, is there any other way?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by