Great code, thanks. I have an issue, apologies if already addressed and I did not find it.
Everything works great, but when I attempt to add items to a chart -- say, using text or patch function -- it adds it to a new figure. These functions don't work with handles, specifically, but even if I activate the figure just before running each of these functions...it still creates a new figure.
It seems like I am missing something fundamentally here, appreciate any thoughts you can provide.