MATLAB Answers

How to fix annotation textbox misalignment from R2014a to R2014b?

1 view (last 30 days)
William Lu
William Lu on 22 Nov 2014
The following has a textbox that fits nicely in R2014a but has an offset to R2014b. How can I go about fixing this?
figure('Position',[30, 55, 1200, 600])
str = {[sprintf('xxxxTitlexxxxx')], ...
[sprintf(' ')], ...
[sprintf(' Measurement1%f', 123)], ...
[sprintf(' Measurement2%f', 321)], ...
[sprintf(' Measurement1%f', 123)], ...
[sprintf(' Measurement2%f', 321)], ...
[sprintf(' ')], ...
[sprintf(' Measurement1%f', 123)], ...
[sprintf(' Measurement2%f', 321)], ...
[sprintf(' Measurement1%f', 123)], ...
[sprintf(' Measurement2%f', 321)], ...
[sprintf(' ')], ...
[sprintf(' Measurement1%f', 123)], ...
[sprintf(' Measurement2%f', 321)], ...
[sprintf(' Measurement1%f', 123)], ...
[sprintf(' Measurement2%f', 321)], ...
[sprintf(' ')], ...
[sprintf(' Measurement1%f', 123)], ...
[sprintf(' Measurement2%f', 321)], ...
[sprintf(' Measurement1%f', 123)], ...
[sprintf(' Measurement2%f', 321)], ...
[sprintf(' ')]};
annotation('textbox',[0.5 0.8 0.1 0.1],'String',str,'BackgroundColor',[1 1 1],...
'FontName', 'Courier','FontSize',13,'FitBoxToText','on','VerticalAlignment','middle');

  0 Comments

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!