How to remove lines in meshgrid

Hi All, I have been working on a code to show slices of my model grid. I want to remove the "Grid" lines eliminating the rectangular boxes shown in the grids. I have been using the following code:
[x,y,z] = meshgrid(1:100:499,1:100:499,1:10:24);
% K_final = a matrix of x,y,z and K field where K is dependent on independent variables x,y,z
v = log(K_final);
xslice = [100,250,225];
yslice = [100,300,200,400];
zslice = [];
slice(v,xslice,yslice,zslice,'LineStyle','none');
colormap jet;
grid off
xlabel 'This is x axis'
ylabel 'This is y axis'
zlabel 'This is z axis'
% GRAY, HOT, COOL, BONE, COPPER, PINK, FLAG, PRISM, JET
I want to remove the Cell outline on the image this creates?
Thanks, Eric

7 comentarios

Rik
Rik el 2 de Jun. de 2017
Is there an easy way to reproduce an estimate of K_final to make this a MWE? Also, you are aware that slice is producing the visualization, not meshgrid?
Eric Daiber
Eric Daiber el 2 de Jun. de 2017
I found what to use:
set(h,'edgecolor','none')
Thanks though, Eric
J K
J K el 19 de Jul. de 2019
Could you please tell me what is h with a meshgrid plot? I have this code and I do not know what h should be.
[W, Kx, Ky] = meshgrid(w, kx, ky);
for b = 1:9;
input = exp(-((W-w_o).^2)/deltaW.^2).*exp(-(Kx.^2+Ky.^2)/(deltaK.^2)).*exp(1*i.*sqrt((W/c).^2-(Kx.^2+Ky.^2)).*z(b));
fourier = fftn(input);
shifted = fftshift(fourier);
absolute = abs(shifted).^2;
figure(3);
subplot(3,3,b);
[T, X, Y] = meshgrid(t, x, y);
tslice = [0];
xslice = [0];
yslice = [0];
slice(T, X, Y, absolute, tslice, xslice, yslice);
set(H,'edgecolor','none')
end
the cyclist
the cyclist el 19 de Jul. de 2019
Call slice() as
h = slice(T, X, Y, absolute, tslice, xslice, yslice);
to get the handle, then
set(h,'edgecolor','none')
J K
J K el 19 de Jul. de 2019
Editada: J K el 19 de Jul. de 2019
Thank you cyclist. But now it is purple. Is there a way to make ithe background colorless? Edit: so far my research says that there is no way to change the background from purple to no color.
the cyclist
the cyclist el 19 de Jul. de 2019
Um, did the command I suggested did cause the purple color?
You might want to ask a new question, rather than commenting on a 2-year-old one, and post your whole code. (It was by pure chance that I stumbled upon it here.)
J K
J K el 19 de Jul. de 2019
I think that the default color is purple. Thank you! You are right. I will post a new one.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Contour Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 2 de Jun. de 2017

Comentada:

J K
el 19 de Jul. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by