imshow border tight for subplot
Show older comments
i can hide the grey border around the figure with setting;
iptsetpref('ImshowBorder','tight');
figure;Image = rand(1000,1000);
imshow(Image,[]), colormap jet;
How can i do the same if i am using subplot! iptsetpref doesnot seem to have any effect in subplot.
iptsetpref('ImshowBorder','tight');
figure;
subplot(1,2,1)
imshow(Image,[]), colormap jet;
subplot(1,2,2)
imshow(Image,[]), colormap jet;
Accepted Answer
More Answers (1)
Sean de Wolski
on 10 Feb 2012
Instead of using subplot, build the axes directly:
figure('units','pixels','position',[200 200 800 400]); 5fig
axes('units','norm','outerposition',[0 0 0.5 1],'position',[0 0 0.5 1]) %left axes
imshow(rand(100),[])
axes('units','norm','outerposition',[0.5 0 0.5 1],'position',[0.5 0 0.5 1]) %right axes
imshow(imread('cameraman.tif'),[])
2 Comments
Sukuchha
on 10 Feb 2012
Sean de Wolski
on 10 Feb 2012
Sure! In fact that sounds like a good idea for a game of code golf! I'll get back to you on this later this afternoon.
Categories
Find more on Subplots 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!