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

2 visualizzazioni (ultimi 30 giorni)
simran il 30 Set 2023
Commentato: Stephen23 il 1 Ott 2023
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
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')
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
Stephen23 il 1 Ott 2023

Accedi per commentare.

### Risposta accettata

dpb il 30 Set 2023
Modificato: dpb il 30 Set 2023
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
%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
%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 CommentiMostra 1 commento meno recenteNascondi 1 commento meno recente
dpb il 1 Ott 2023
Correct, it was just for illustration of how the color map fits to the range of the given figure values...
simran il 1 Ott 2023
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?

Accedi per commentare.

### Categorie

Scopri di più su Colormaps in Help Center e File Exchange

R2023b

### Community Treasure Hunt

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

Start Hunting!

Translated by