How can I put a MATLAB figure in a presentation so that the slide background shows through?

2 visualizaciones (últimos 30 días)
Let's make a figure:
logo;
set(gcf, 'color', 'w');
alpha(0.7);
Doesn't that look nice. Now I'd like to place that figure in a slide of my presentation. I happen to be using Powerpoint, but I guess other people might be using a different package. Also, it's a flashy presentation and my slide background has some fancy graphics. I don't want the figure's frame (the white area in my example) to cover up the slide. Ideally I'd also like the background to show through the slightly transparent bits of the figure (in my example, the logo).
How can I achieve this?

Respuesta aceptada

Jiro Doke
Jiro Doke el 3 de Feb. de 2011

export_fig by Oliver does this.

Excerpt from the help for export_fig:

For transparent background (and semi-transparent patch objects), set the figure (and axes) 'Color' property to 'none'; pdf, eps and png are the only file formats to support a transparent background, whilst the png format alone supports transparency of patch objects.

logo;
set(gcf, 'color', 'none');
alpha(0.7);
export_fig perfect_solution.png

Maybe Oliver can enlighten us on how he did it.

EDIT: Here's is an example of the exported image over a fancy, textured background:

(Image Source: http://sites.google.com/site/oliverwoodford/software/export_fig)

  1 comentario
Oliver Woodford
Oliver Woodford el 3 de Feb. de 2011
You can ascertain the transparency of a pixel by seeing how it changes as the background colour changes. I print the figure twice, with a black background and a white background, and compute the alphamatte from this.
Feel free to embed the relevant image from the examples web page in your answer, Jiro.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by