plot figures in layers

34 views (last 30 days)
suhad behadili
suhad behadili on 22 Jun 2015
Answered: Walter Roberson on 22 Jun 2015
Hello
I have 12 figures "fig" drawn by matlab distribution function , well I need to join these figures in one figure "just like layers" with keeping their properties, so can matlab do that ? mean represent them as layers with some transparency . then I need to manipulate them independently when they are assembled
cheers Suhad

Answers (1)

Walter Roberson
Walter Roberson on 22 Jun 2015
No. In MATLAB, figures are independent of each other and the only extent to which they can interact visually is that you can set the background color to 'none' to have items underneath show up where nothing else is drawn.
What is possible is to extract the graphics from figures and copyobj() them into a common figure. Some MATLAB graphics objects support transparency through Alpha Data properties, but most line and text-like objects do not. image(), surface() and patch() primitive objects support Alpha, and most "graphics" that are not lines or text are made up of those primitives. Relevant properties include: AlphaData, AlphaDataMapping, EdgeAlpha, FaceAlpha, FaceVertexAlphaData.
If the individual figures have different colormaps then there can be difficulty reconciling the colormaps; the file exchange contribution freezeColors() can help with that. With R2014b and later, you can have colormaps on a per-axis basis.

Community Treasure Hunt

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

Start Hunting!