How to plot MESH only in black?
Ältere Kommentare anzeigen
Can the 'mesh' plot be in a single color, say black, and not in color map?
Thanks.
Antworten (5)
Kelly Kearney
am 3 Jun. 2014
mesh(x,y,z, 'edgecolor', 'k')
You could set the colormap to black only, and use surf instead.
[x,y] = meshgrid([-2:.2:2]);
Z = x.*exp(-x.^2-y.^2);
surf(x,y,Z)
colormap([0 0 0])
1 Kommentar
%Alternative 1
figure(1)
plot3(x,y,Z,'k-');
%Alternative 2
figure(2)
plot3(x',y',Z','k-');
Please accept an answer if it helped you.
John
am 3 Jun. 2014
0 Stimmen
1 Kommentar
Kelly Kearney
am 3 Jun. 2014
What do you mean? A mesh plot doesn't have a "baseline"... perhaps you're seeing an artifact of your data? Can you give an example, or post a screenshot of your plot?
Bjørn Kvamme
am 23 Mär. 2020
0 Stimmen
I wanted to get this plot in shades of grey/black instead of colours but meshc does not accept "edgecolour"
load CH4_expT4
x3=CH4_expT4(:,1)
y3=CH4_expT4(:,3)
z3=CH4_expT4(:,2)
xv = linspace(min(x3), max(x3), 1000);
yv = linspace(min(y3), max(y3), 1000);
[X,Y] = meshgrid(xv, yv);
Z = griddata(x3, y3, z3, X, Y);
meshc(X,Y,Z,'edgecolor','k')
grid on
ylabel('Temperature (K)')
zlabel('Pressure (Bars)')
xlabel('time (hours)')
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!