Is it possible Matlab shows the grid on the surface of the plot?

25 visualizaciones (últimos 30 días)
Wajahat
Wajahat el 4 de Abr. de 2020
Respondida: Walter Roberson el 4 de Abr. de 2020
close all;
X=-10:.1:10;
T=-10:.1:10;
%i=1;
w0=1;
c=-1;
mu1=.4*1i;
a=2*mu1.^2-(2*w0.^2);
[x,t]=meshgrid(X,T);
u=2*(1i*mu1.*x-(1i*mu1*c./(a)).*t);
r1=-4*1i*mu1*sin(u);
surf(x,t,abs(r1));
shading flat;
%grid off;
view(-48,68)
Is it possible Matlab shows the grid on the surface of the plot? i.e.

Respuestas (2)

KALYAN ACHARJYA
KALYAN ACHARJYA el 4 de Abr. de 2020
Editada: KALYAN ACHARJYA el 4 de Abr. de 2020
Change the faceAlpha (within 0 and 1) value, see, it may heps you (This is transperancy)
surf(x,t,abs(r1),'FaceAlpha',0.5);
Or Try this one:
X=-10:.1:10;
T=-10:.1:10;
%i=1;
w0=1;
c=-1;
mu1=.4*1i;
a=2*mu1.^2-(2*w0.^2);
[x,t]=meshgrid(X,T);
u=2*(1i*mu1.*x-(1i*mu1*c./(a)).*t);
r1=-4*1i*mu1*sin(u);
h=surf(x,t,abs(r1));
shading interp;
set(h,'edgecolor','m')
% Similarly you can change the face color also for more visible.
view(-48,68)

Walter Roberson
Walter Roberson el 4 de Abr. de 2020
X=-10:.1:10;
T=-10:.1:10;
%i=1;
w0=1;
c=-1;
mu1=.4*1i;
a=2*mu1.^2-(2*w0.^2);
[x,t]=meshgrid(X,T);
u=2*(1i*mu1.*x-(1i*mu1*c./(a)).*t);
r1=-4*1i*mu1*sin(u);
h = surf(x,t,abs(r1));
shading flat;
%grid off;
view(-48,68)
h.EdgeColor = 'k';
However, you have so many edges in this plot that when you turn the edges back on, the entire plot will look black.

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by