Problem with print command

3 views (last 30 days)
In a script for generating a 3d plot, using surf, text, plot3, annotation etc, I mark a point with
plot3(x1,y1,z1,'k.','MarkerSize',20);
It appears as a bullet of the expected size in the figure window. But when I subsequently do
print -dpng 'translate.png'
and open translate.png, the bullet appears in a smaller (probably default) size, really too small to see. Is this a bug in Matlab or am I doing something wrong. Is there some known way to fix the problem?
  3 Comments
Brynjulf Owren
Brynjulf Owren on 28 Jan 2021
Thanks, some further tests confirm that you are right. I also found another fix. Increasing the MarkerSize to 25 caused the problem to go away, at the expense of having to use a slightly larger bullet than I had in mind.
Bjorn Gustavsson
Bjorn Gustavsson on 28 Jan 2021
This might also be version/OS-dependent, when I tried your example (V2020a/Ubuntu) it worked OK...

Sign in to comment.

Accepted Answer

Bjorn Gustavsson
Bjorn Gustavsson on 28 Jan 2021
Perhaps using scatter3 can be a QD workaround? It would be a bit fiddlier, but it might work, I have the impression that those markers are rendered differently than the '.'-markers.
HTH

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!