MATLAB Answers

Change meshgrid face color

12 views (last 30 days)
SuzieChan
SuzieChan on 22 Apr 2020
Answered: Sindar on 22 Apr 2020
Hi.
What code do I need to change meshgrid face color to 'transparent'?
Thank you.
N = 100; % Size Of Interpolation Vectors/Matrices
Ltv = linspace(min(W(:,1)), max(W(:,1)), N); % Latitude Vector For Interpolation
Lnv = linspace(min(W(:,2)), max(W(:,2)), N); % Longitude Vector For Interpolation
[Ltm,Lnm] = meshgrid(Ltv, Lnv); % Matrices For Interpolation
Pm = griddata(W(:,1), W(:,2), W(:,3), Ltm, Lnm); % Interpolate
figure
surf(Ltm, Lnm, Pm)
colorbar;
grid on
view(40,40)
xlabel('Latitude')
ylabel('Longitude')
zlabel('Total Precipitation (mm)')

  0 Comments

Sign in to comment.

Accepted Answer

Sindar
Sindar on 22 Apr 2020
surf(Ltm, Lnm, Pm,'FaceAlpha',0.5)
to set transparency to 50%. See other options here

  0 Comments

Sign in to comment.

More Answers (0)

Tags