The shape of lines in a figure

조회 수: 7 (최근 30일)
Sam Alex
Sam Alex 2012년 12월 29일
Hello,
Why do the drawn lines in my figure look thin and not smooth curved lines? In this link you will see the first figure (my figure) and in the second one is the target (just black and white, thicker lines and smooth drawing lines): http://speedy.sh/zaK8p/test.docx
Thanks
  댓글 수: 2
Walter Roberson
Walter Roberson 2012년 12월 30일
Posting the images would have been easier on us. I dislike firing up MS Word. (Too many bad associations with Catbert-inspired paperwork.)
Jan
Jan 2012년 12월 30일
Where do the figures look as described? On the screen, when exported to a pixel image and magnified, when exported to an EPS, but after an import to Word only the pixel-preview is displayed on the screen, but when printed to paper or to a PDF the graphics are excellent?

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

답변 (2개)

Walter Roberson
Walter Roberson 2012년 12월 30일
I would suggest plotting with no marker specified, with the default line stype ('-') and perhaps with a LineWidth given. LineWidth is in points and the default is 1/2 point.
The graph you showed appeared to either have markers or to be using '--.' line style.

Image Analyst
Image Analyst 2012년 12월 30일
Try adding this option to whatever function (plot, contour, etc.) you used to plot the curves:
..... 'LineWidth', 3, ........
That should thicken them up. LineWidth is a common option used by a bunch of functions.
Your plot (the top colored one) looks fine to me. I don't see broken line like Walter. Tell me what "the target" is and why it apparently rasterizes the plot and loses the colors. Because of the rasterization/quantization/digitization/sampling (whatever you want to call it) and the apparent anti-aliasing being done along with that, it gives a choppy appearance to the curves on the bottom plot on "the target" (whatever that is).
  댓글 수: 13
Sam Alex
Sam Alex 2012년 12월 30일
BTW, when I reproduced this figure it still did not give me drawing lines as smooth as yours in that figure! Any ideas here what is going on?
Malcolm Lidierth
Malcolm Lidierth 2012년 12월 30일
@Sam
You should see no difference when the figure is saved to a vector format - that has no dependency of the screen resolution. Double-click the graph and choose Save As button in the Graph Editor GUI that appears and choose PDF/SVG output. Or choose Copy to clipboard (not Copy image) - that copies to PDF allowing high-quality graphs to be pasted straight into Word (again re-rendered - all using Apache Batik under the hood).
On screen, smoothness will vary with hardware, OS and the Java Virtual Machine being used - on a Mac for example with the Apple JVM using the Quartz graphics pipeline, the lines are pretty smooth. On Windows, you will likely see some wiggles. It may be worth updating to the latest JRE on Windows and activating Direct X via a java.opts file - much faster graphics then, too.
If you have any feature requests for MATLAB, do post them at http://www.mathworks.com/matlabcentral/answers/56890-publication-quality-graphics-in-matlab. I'll be checking there regularly.
ML

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by