using export_fig to crop image, including axis
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all,
I am trying to use export_fig to crop the image. I successfully removed the background, but the numbers for the axis are still on display.
This is the code:
figure(1)
imagesc(x_axis,axial_distance_water,grayscale2);
colormap(gray);
axis image
export_fig(filename,'-transparent','-tif');
I attach the resulting figure using export_fig and what I need (using cropping function with PowerPoint).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/193909/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/193910/image.png)
Did anybody had the same issue?
I could not find related examples shown in github for export_fig.
Thanks in advance
4 commentaires
Réponse acceptée
jonas
le 16 Août 2018
Consider removing the ticklabels and/or ticks before exporting the figure.
set(gca,'ytick',[],'xtick',[])
set(gca,'yticklabels',{},'xticklabels',{})
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Import and Export dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!