Best way to export image using Matlab for Latex and Powerpoint - SVG?

77 views (last 30 days)
I generate colourful surface plots in Matlab and would like to save them such that I can use them in MS powerpoint and in Latex / MS word reports.
1. My presentations tend to have black bg and reports have a white bg. Hence I think exporting the images once with a transparent background probably makes most sense.
2. Vector images appeal due to their scalability, and ease of background modification. MS powerpoint only really supports .svg vector images. Latex can handle svg images using a package that converts them to pdf in background (which would be fine - as my main results storage would still consist of 1 svg image per item).
3. Matlab doesn't make it easy to export svg images with transparent backgrounds. The new exportfigure function doesn't support svg. Print does. e.g.
print(figObject,'-dsvg',fileName);
I think I'll be able to bodge code together to make it work (I sampled it today, and it kind of worked, but need to prevent text from messing up).
I want to sanity check this. Is there a better solution to my problem?
EDIT (forgot some important info..):
  1. I also create a few videos , and I believe writeVideo doesn't support vector images? (Unsure?). So perhaps transparent PNG images work best for video generation (although this isn't easy in matlab either)?. Which would mean a mix of PNG output for some images and SVG for others?
  2. I automate some of my powerpoint creation.

Answers (1)

Chunru
Chunru on 12 Apr 2022
For LaTeX, you have the following options in addition to svg:
For MS Office:
  • svg
  • emf (which is not really the vector graph)
  5 Comments

Sign in to comment.

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!