Dock a figure inside another figure with different graphics rendering
2 views (last 30 days)
Show older comments
Fredrik Gustavsson
on 24 May 2018
Commented: Fredrik Gustavsson
on 24 May 2018
Hi,
I have a main figure with a lot of uicontrols and graphs, some with simple animated lines, in version R2012b. The figure is rendered with zbuffer and everything looks fine. Now, I want to add a graph with a trisurface and animate it using hgtranform. It turns out that the zbuffer rendering causes the 3D animation run very slowly but if I change to opengl, it's runs fast and nice. However, many of the other graphics objects turn out looking bad with opengl. A Matlab figure can only use one type of rendering as far as I know. My question is then, is it possible to incorporate or dock another figure into the GUI figure and make it look like a plain pair of axes? No window frame, no toolbar, no menu, etc, just axes. Then I could render the docked figure as opengl and enjoy fast 3D animation simultaneously with the rest of the zbuffer rendered graphics in the main GUI figure. Can it be done? Will it last in a deployed version? I have tried the most conventional ways of improving the animation speed (fixes axes limits, reduce no of polygons, no legend,...). Thanks!
0 Comments
Accepted Answer
Jan
on 24 May 2018
Under Windows you can use https://www.mathworks.com/matlabcentral/fileexchange/31437-windowapi to create a figure without border. Then moving the main figure must update the position of this "sub-figure" also. But it is not trivial to fix the stacking order: You can set the "sub-figure" as top-most window, but then activating another application does not move it to the background. Without the top-most property, clicking on the main GUI let it appear in front of the "sub-figure".
I think, this is not user-friendly enough. Let the OpenGL animation run in a separate figure.
More Answers (0)
See Also
Categories
Find more on Specifying Target for Graphics Output 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!