saved pdf cuts off 3d text

1 vue (au cours des 30 derniers jours)
Andrew
Andrew le 28 Sep 2015
Commenté : Mike Garrity le 29 Sep 2015
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 commentaires
Walter Roberson
Walter Roberson le 28 Sep 2015
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.
Andrew
Andrew le 28 Sep 2015
Yes, I am using 2015a... If the problem doesn't exist in earlier versions I can likely get access to one of those.

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 28 Sep 2015
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 commentaire
Mike Garrity
Mike Garrity le 29 Sep 2015
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by