MATLAB: Using “hold all” and “hold on” for a 3D scatterplot

holdhold allplotscatterscatter3

I am making a large number of figures proceeded by a for loop. Every iteration of the for loop adds a plot layer on top of each figure.
Using "hold all" and calling the figure axes works for all of these scatterplots except for one, which is a 3D scatterplot (made using scatter3). This figure displays only the information from the last iteration.
Is there a reason why scatter3 wouldn't have the same hold properties as scatter, and if so, how can I make the plots hold? Thanks!

Best Answer

Mystery solved! There was a stray "hold off" earlier in the code that didn't affect any figures except for this one. Why it didn't affect the other figures is equally mysterious to me, but I'm glad it works now!