Creating vector plots of wireframe surfaces
이전 댓글 표시
The situation is that you'd like to plot a surface mesh using many points, but only wish to display the mesh lines within an undersampled grid. This can be done with the wireframe fix by Daniel Ennis.
The following plots a surface using 101x101 points, sets the edges to none and faces to white, and then plots a wireframe with 5 times fewer lines.
x = [0:0.1:10];
y = [0:0.1:10];
z = sin(x)'*cos(y);
S = mesh(x,y,z); wireframe(x,y,z,5);
set(S, 'EdgeColor', 'none', 'FaceColor', 'w');
set(gca, 'Visible', 'off')
This works if you want to output the image to a raster format, but if you want to output to a vector format, then it looks terrible. These were outputted using the export_fig package on the File Exchange, but all exporting formats will be similar.

I've tried all three types of renderers, and they all look similar.

There are similar problems if you use 'interp' option for the FaceColor, but this is not so big of a deal since if you're looking for a smoothly interpolated colored surface, you're going to have to do it rasterized anyways.
Is there a way to generate black-and-white mesh surfaces using many points, but with downsampled edges?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!