If I store data in the UserData property of an open axes object and then plot something on the axes, the UserData is deleted. Does this happen for a good reason, and is there any way to prevent it?
Here is sample code to illustrate this:
>> myAx = axes;>> myAx.UserData = 1:10;>> myAx.UserDataans = 1 2 3 4 5 6 7 8 9 10>> plot(rand(5))>> myAx.UserDataans = []
I'd like to have UserData persist after adding more graphics objects to the axes.
Best Answer