Remove the border lines.

84 visualizaciones (últimos 30 días)
Talal Salem
Talal Salem el 20 de Sept. de 2019
Editada: Talal Salem el 23 de Sept. de 2019
I’m wondering how to remove the border line in my contour line. Basically, I want the color variation to be smooth and not separated by these line.
x1=[1.3, 1.76];
y1=[271, 241];
[xx1, yy1] = meshgrid(x1, y1);
z1=[3.3,3.7;3.7,3.3];
figure(1)
contourf(xx1,yy1,z1)
caxis ([3.3,3.7])
colormap(jet)
hcb=colorbar;
grid off;

Respuestas (2)

Ankit
Ankit el 20 de Sept. de 2019
hello,
you need to set the edgecolor property to none.
x1=[1.3, 1.76];
y1=[271, 241];
[xx1, yy1] = meshgrid(x1, y1);
z1=[3.3,3.7;3.7,3.3];
figure(1)
contourf(xx1,yy1,z1,'edgecolor','none')
caxis ([3.3,3.7])
colormap(jet)
hcb=colorbar;
grid off;
Regards
Ankit
  2 comentarios
Talal Salem
Talal Salem el 23 de Sept. de 2019
I think using surf command will solve the problem.
Thank you.
Ankit
Ankit el 23 de Sept. de 2019
Have you tried the above code?. It is working for me!

Iniciar sesión para comentar.


Akira Agata
Akira Agata el 20 de Sept. de 2019
How about using surf function with 'FaceColor' = 'interp' option, instead.
Here is an example.
figure
surf(xx1,yy1,z1,'FaceColor','interp')
colormap(jet)
colorbar;
view(2)
ax = gca;
ax.XLim = x1;
ax.YLim = fliplr(y1); % since y1(1) > y1(2)
surf.png
  1 comentario
Talal Salem
Talal Salem el 23 de Sept. de 2019
Editada: Talal Salem el 23 de Sept. de 2019
Thanks a lot, that was very helpful.

Iniciar sesión para comentar.

Categorías

Más información sobre Colormaps 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