필터 지우기
필터 지우기

Saveas or print: figure not appearing as desired (scatter points are half points, black lines appearing in a red region)

조회 수: 2 (최근 30일)
Consider the following figure in Matlab
load matrices
%Rb, vertices_deg, vertices_comp
close all
patch([0 0 1],[0 1 0],[1 0 0],[0.8 0.8 0.8]);
axis equal
axis([0 1 0 1 0 1])
view(120,30)
hold on
T = delaunayTriangulation(Rb.');
K = convexHull(T);
patch('Faces',K,'Vertices',T.Points,'FaceColor','k','edgecolor','k');
hold on
scatter3(vertices_deg(:,1), vertices_deg(:,2) , vertices_deg(:,3),100,'o','filled','b')
hold on
patch(vertices_comp(:,1), vertices_comp(:,2) , vertices_comp(:,3),'red')
hold off
xlim([0 1])
ylim([0 1])
zlim([0,1])
box on
set(gca, 'ytick',0:0.2:1,'xtick',0:0.2:1,'ztick',0:0.2:1,'FontSize',13)
I would like to save this figure in a way such that:
  • within the red region, I do not get the black lines that I can see in the Matlab output
  • the blu scatter point is a full circle (and not half circle, as it appears in the Matlab output)
I tried two ways of saving the figure
saveas(gcf,'3.jpg')
print(gcf, '3.jpg', '-dpng', '-r300', '-painters')
None of these two gives me what I want. Could you help?
This is what I get with print and with saves
3SAVEAS.jpg
3PRINT.jpg
  댓글 수: 1
darova
darova 2019년 10월 26일
Can't replace it a bit?
T.Points = T.Points + 0.01;
vertices_deg = vertices_deg + 0.02;
vertices_comp = vertices_comp + 0.02;

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by