saved pdf cuts off 3d text
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello everyone,
I have run into an odd problem with exporting a figure to a pdf file using the painters buffer. I am working with a surface object that I have created using the underlying surface syntax so that I can have the proper number of cells (unlike surf which reduces the number of cells by 1 in the row and column direction).
my call to surface is something like this
surface('xdata',x,'ydata',y,'zdata',z,'cdata',I,'edgecolor','none','facecolor','texturemap')
This does exactly what I want. Later I add some text to this figure
text(x1,y1,z1,'blah blah blah','interpreter','latex','fontsize',16,'backgroundcolor',[0.5,0.5,0.5],'color','r')
Everything looks great in my figure window and I'm happy with the result. Then I try to save the figure to a pdf file using the painters render to get vector graphics. I get this:
As you can see, for some reason part of the text is being cut off. What it should look like is this:
Has anyone else experienced a similar issue? Does anyone know how I can fix this? I've tried using uistack to make sure that the tex is the top layer but that hasn't changed anything. If I switch the renderer to opengl then things look alright, as you can see in the png, but I don't get the nice vector graphics that I'm looking for.
댓글 수: 2
Walter Roberson
2015년 9월 28일
Which MATLAB version are you using? I suspect you are using R2014b or later, but it makes a significant difference if you are using an earlier version.
답변 (1개)
Walter Roberson
2015년 9월 28일
It is a coplanar limitation. You can change the coordinates of the text to make them slightly "closer" to the viewer than the item you are laying the text upon so that they are no longer coplanar.
댓글 수: 1
Mike Garrity
2015년 9월 29일
Yes, or it could be a bug in the depth sort that the painters renderer uses. I would suggest sending some repro steps to Mathworks support so we can check it out.
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!