Bounding box around image
Show older comments
I'm attempting to show an image within a plot, with a bounding box around the image. However, the following results in an image without a bounding box, despite the box being explicitly asked for:
clear
close all
% Create figure
fig1 = figure;
% Random plot
plot( (1:10), randi(10,1,10) )
% Create new axes within existing
axes('pos',[.1 .6 .5 .3])
% Load and show image
imshow('coins.png')
a1 = gca;
% Try turning box on and redrawing
a1.Box = 'on';
drawnow;
Any suggestions as to how this might be resolved? I'm hoping there's a simpler way than having to manually draw a box over the top...
Accepted Answer
More Answers (1)
Matt J
on 18 Oct 2018
0 votes
This might be a useful alternative,
1 Comment
Owen Gebler
on 18 Oct 2018
Categories
Find more on Image Arithmetic 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!