I have reported the problem with different axes that are displayed on top of other axes within different tabs of a TabPanel in July 2012, Alexander reproduced the problem in January 2013 and in May Collin has reported similar issues.
After I have encountered the problem first I figured out that that changing the DefaultRenderer to painters resolved the issue (set(0,'DefaultFigureRenderer','painters')). If you have a similar problem, could you please confirm that this works for you, too? As I am creating 3d plots this is not an option for me, so after Ben's hint I can confirm that resizing the figure resolves the issue, thus I have written a callback function that automatically resizes the figure after a tab change. Not a nice way but up to now it was a sufficient workaround. However, this option does not work an my MAC computer, as Matlab for MAC (R2013a) crashes non-deterministically when resizing a figure (I had similar issues with closing figures on R2012b on MAC).
Here is a little bit of code to reprocude the problem (works for me on MAC R2012b, MAC R2013a and Linux R2012):
I'd like to use your code for the creation of a volume from an isosurface defined by the vertices and the faces as used by patch. However, the VOXELISE method does not return the expected results. I have created a simple example in order to reproduce the problem:
Am I doing something wrong or is this a bug in the code?
I believe I have found out how to reproduce the problem. If I use 'painters' (default) as figure renderer the problem does not occur. However, when using opengl rendering the above mentionend problem happens.
To reproduce, execute set(0,'DefaultFigureRenderer','OpenGL') before running my example code (text() makes no difference)
Unfortunately, 'painters' is no option for me as I am doing more advanced 3d rendering.
I have messed a bit with drawnow. The simple example I have given is fine by using drawnow. However, if you additionally use the text function in the plot it is not working correctly. Maybe you can reproduce the issue on your system:
Oh, sorry. I did't see that other post.
Could it have something to do with plot properties? If a greate a plot with like:
Then the '.k' will cause all other plots in tabs, to be traced through the layer of tabs. If i use 'k' - thereby skipping the '.' - all works fine.
Yes I have seen this problem, please see my comment from 12 Nov 2013.
Plotting in a UIPanel improved the situation but didn't resolve it completely.
It maybe also related to @Stephanie's problem below 08Sep2014. I have not tried investigating that solution/work around, if you come up with a solution, please post.
Plotting with plot3 on tabs other then the first, will cause the lines in the plot, to "trace" back on tabs prior to the tab, with the plot3. It works fine if the plot3 has a TabPanel as Parent, but not if plot3 has, for instance, a HBox as parent.
Anyone else with this problem or a solution for it?