Removing the grey margin of a plot
Afficher commentaires plus anciens
Hi I'm doing an image analysis using matlab. I have a figure that I need to remove the grey margin and axes while keeping the original white plot area size constant and then save it as png. You can see the saved original png which I need to remove the axes and the margin but keeping the plot area size constant. p.s. I'm using R2017a version.
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 27 Nov 2017
img = imread('fig2.png');
im2 = img;
mask = repmat(all(im2 < 240,3),1,1,3);
im2(mask) = 255;
1 commentaire
hamed
le 27 Nov 2017
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!