The shape of lines in a figure

3 views (last 30 days)
Sam Alex
Sam Alex on 29 Dec 2012
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 Comments
Walter Roberson
Walter Roberson on 30 Dec 2012
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 on 30 Dec 2012
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?

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 30 Dec 2012
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 on 30 Dec 2012
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 Comments
Sam Alex
Sam Alex on 30 Dec 2012
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 on 30 Dec 2012
@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

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!