Line resolution and crispness

2 views (last 30 days)
Theo
Theo on 7 Oct 2011
I notice that often when I draw lines in Matlab, the line is not very crisp. Here are two images where this cragginess is apparent. The images only differ by the thickness of the white line. They were both outputted to png format, but the loss in quality is apparent from the beginning, and within the Matlab figure window.
How can I make the white line smooth? It's not a question of using enough points within the curve. Increasing the number of points does not alleviate the cragginess.

Answers (1)

Walter Roberson
Walter Roberson on 7 Oct 2011
Possibly if you lifted the Z for the lines slightly higher? It appears to me that in places the corners of the blue patches are above the white line.
  2 Comments
Theo
Theo on 7 Oct 2011
I agree that it seems to have something to do with the rendering of the surface underneath the line. However, raising the line does not do anything. It still remains craggy (perhaps, as you pointed out, in the regions where the black contour lines of the surface intersect the white line)
Bjorn Gustavsson
Bjorn Gustavsson on 7 Oct 2011
In addition to Walter's trick you could perhaps increase the linewidth a bit? If you change the rotation of the axis after plotting the white line maybe the problem goes away if you set the final view-point before plotting the white line instead.

Sign in to comment.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!