필터 지우기
필터 지우기

Graphs aren't showing up well when imported in to other programs - can I thicken lines?

조회 수: 4 (최근 30일)
All of my graphs look really poor when I save them as image files and put them into a word processing document. I've tried a few different image file types - jpeg, png, and even lossless tif.
The weird thing is that when I import them into Mathematica (which I'm using as a word processor due to it's abilities to write equations really well) the images look blurred. But when I import them into photoshop cs they're super sharp - and the lines appear to be too thin. This makes the lines disappear depending on how far in the zoom is.
Is there a way to get Matlab to increase the thickness of the lines? It's happening to all of the lines - the graph surround, the plot lines themselves, the legend - all of it.
  댓글 수: 2
Daniel Shub
Daniel Shub 2011년 12월 12일
What word processing program are you using? Is it an on screen issue, or do you have problems with hard copy print outs?
Matt Fig
Matt Fig 2012년 11월 2일
All of my graphs look really poor when I save them as image files and put them into a word processing document. I've tried a few different image file types - jpeg, png, and even lossless tif.
The weird thing is that when I import them into Mathematica (which I'm using as a word processor due to it's abilities to write equations really well) the images look blurred. But when I import them into photoshop cs they're super sharp - and the lines appear to be too thin. This makes the lines disappear depending on how far in the zoom is.
Is there a way to get Matlab to increase the thickness of the lines? It's happening to all of the lines - the graph surround, the plot lines themselves, the legend - all of it.

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

채택된 답변

Jan
Jan 2011년 12월 12일
You can increase the LineWidth of objects created by line, patch and surface. The axes - object itself can be drawn thicker also. The graphic objects can be smoothed by setting the undocumented 'LineSmoothing' of the objects to 'on' (you can ask Google for details).
I assume the exported graphics are ok, but you scale them in the word-processors, which must blur the images.
I prefer to export EPS printf('-depsc2'), system('GhostScript') . The very good FEX submission export_fig creates nice EPS graphics also. When I import them to Microsoft Word, the display on teh screen is not perfect, because the embedded TIFF-preview is shown, but printing to paper or a PDF creates excellent scalable diagrams.
Another problem could be the renderer: If the figure is rendererd by OpenGL, only bitmap graphics can be exported. The OpenGL-Renderer is enabled automatuically, if complicated 3D scenes are displayed of transparent objects are drawn. Then exporting the bitmaps should be accompanied by increasing the resolution, see help print, especially the "-r" option.

추가 답변 (2개)

the cyclist
the cyclist 2011년 12월 12일
Two thoughts:
  • Yes, you can increase the line thickness of most lines using property handles. For example:
h = plot(1:10)
set(h,'LineWidth',3)
will make the plotted line thicker. (You can similarly make the axes themselves thicker, etc., if you need to.)
  • It might also be resolution issue. You could try increasing the resolution of the output:
print('-dpng','-r600','Test.png')

Bjorn Gustavsson
Bjorn Gustavsson 2011년 12월 12일
In addition to thickening the lines you should consider saving your plots to eps - then you get the benefits of having your images in vector format so they scale better.

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by