Lines appearing on svg images from export_fig

25 views (last 30 days)
HI,
I'm using export_fig to export svg imgas that goes into ms word. However, a grid of non-colored lines appears on the images which becomes very apparent on surface plots and it looks like garbage. Particularly frustrating when there is an intended grid as well. The grid changes with the resolution. Is there a was to get rid of this?
  8 Comments
Kristoffer Clasén
Kristoffer Clasén on 30 Oct 2021
Edited: Kristoffer Clasén on 31 Oct 2021
Yes, tried exportgraphics (of which .eps is the only viable vector outcome), similar result as export_fig, messed up grid, but also undesirable cropping of the image.
It seems export_fig alters linewidths and markersizes when exporting to eps, because the appearance change a lot compared to svg of tif. Axes, markers, all changes. Perhaps because the format doesn't allow certain linewidth?
Edit: So I assume that the grid issue I keep having with eps is that transparency is not supported, and therefore it is rendered as dashes instead. Seems that the linewidths issue can be sorted by simply adjust it a bit, 0.5->0.4 gives similar result visually as when saving as svg/ tif.
Kristoffer Clasén
Kristoffer Clasén on 31 Oct 2021
Gave up on the idea of saving directly to svg. Went for eps instead, which renders ok after some tweaking on linewidths here and there, converting the eps to svg using cloudconvert which works really well and maintains the quality. Had to give up on the grid, the grid doesnt work with contourf and eps, it becomes plotted on top of the surface as dashed lines when exporting to eps. All other plots, lines, bars etc, works with grid however.

Sign in to comment.

Answers (0)

Categories

Find more on Printing and Saving in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!