Why can I not set the 'Position' of the 'textbox' based on a specific axis?
Show older comments
I have a figure with an image, and I would like to create a textbox annotation and position it based on the figure's axes. I use the following code to achieve this:
figure;imagesc
ax_sa = gca
hTextEnd = annotation('textbox', ...
'Position',[0.3 0.3 0.5 0.5],...
'FitBoxToText','on','String',' End','Color','g','FontSize',16,...
'FaceAlpha',1.0,'EdgeColor','w','BackgroundColor','w');
set(hTextEnd,'Parent',ax_sa);
Why does MATLAB not consider the 'set' statement and position the textbox based on the axis?
Accepted Answer
More Answers (0)
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!