MATLAB figure with transparent background into Google Slides
30 views (last 30 days)
Show older comments
I am able to save a MATLAB figure with a transparent background, in EPS format. But Google Slides will not import an EPS file.
I can import other image formats (e.g. PNG) into Google Slides, but I don't seem to be able to create transparent-background PNGs in MATLAB.
I have searched this forum, and played around quite a bit with both exportgraphics and export_fig. I can't seem to get them to do what I want.
Any solution? (I have to use Google Slides.)
1 Comment
Austin M. Weber
on 8 Feb 2024
One way to do this is to place your transparent figure in a new PowerPoint slide. Save the PowerPoint and then go to your Google Slides presentation, go to File >> Import Slides and import your PowerPoint. The figure will be successfully transfered into Google Slides while maintaining its transparent background. (At least, it worked for me when I just tried it, although I saved my figure as an EMF file rather than an EPS).
Accepted Answer
Austin M. Weber
on 8 Feb 2024
This answer is an update to my previous comment with better instructions:
If all you need to do is create a MATLAB figure with a transparent background and then use it in Google Slides:
% Make your figure
x = linspace(0,2*pi,100);
y = cos(x);
figure
plot(x,y,'LineWidth',2,'Color','#f4320c')
When the figure is created, open the Property Inspector and change the background color to 'None':
Next, copy the figure by going to Edit >> Copy Figure:
You can then paste the figure into a PowerPoint slide and save the PowerPoint as normal. Then, go into Google Slides and navigate File >> Import Slides:
Then, you can import your PowerPoint as a Google Slide and it will transfer the MATLAB figure file while keeping its transparent background. You can then change the Google Slide background color to whatever you want to see that the figure is in fact transparent:
6 Comments
More Answers (0)
See Also
Categories
Find more on MATLAB Report Generator in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!