MATLAB: Create plot with specified handle

plot handle

I want to create a plot with the handle 32. Is there any way to do that?

Best Answer

No. But you can specify a "tag" of "32", and then use that to refer to the object using FINDOBJ.
For example:
figure
hold all;
h1 = plot(rand(1,5))
h2 = plot([1 -1 -1 1 -1])
set(h2,'tag','32');
AAA = findobj('tag','32')
set(AAA, 'linewidth',20)