How to create text annotation over a place of subplot
16 views (last 30 days)
Show older comments

I'm trying to draw the statistics section but I couldn't do it.
% figure
figure, subplot(2,3,1), imshow(I), title('Original');
subplot(2,3,2), plot(x,y,'LineWidth', 3), axis([0 255 0 255]), title('Transformation function: I = I+128'), axis square;
subplot(2,3,3), imshow(I1), title('I+128'); %display
subplot(2,3,4), imhist(I), title('Original Histogram');
subplot(2,3,5), annotation('textbox','String',str)
subplot(2,3,6), imhist(I1), title('Modified Histogram');
The annotation part is not working like i want and gives this output

0 Comments
Answers (1)
Star Strider
on 1 Jun 2021
In the documentation Create Text Box Annotation, the textbox can take a dim vector that describes the size and location of the textbox. Experiment with those values to create the correct size and position for it.
0 Comments
See Also
Categories
Find more on Subplots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!