How to snapshot a figure image without axis
85 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
John Wray
il 17 Mag 2016
Commentato: Maximiliano Barbosa
il 24 Feb 2022
Hi,
How do I save the image without axis or annotations etc, using GETFRAME. Just leave the image data.
Thanks.
0 Commenti
Risposta accettata
Walter Roberson
il 17 Mag 2016
set() the Visible property 'off' for anything you do not want to appear in the result. The outer edges and grid lines and tick marks and x/y/z labels can all be combined by
set(gca, 'Visible', 'off')
but if you have drawn any annotation('arrow') or the like then you will need to set those off as well; likewise if you used text() then you will need to set those handles Visible off as well.
0 Commenti
Più risposte (1)
Ajay
il 23 Mag 2019
Modificato: Ajay
il 23 Mag 2019
To Add on to Walter Roberson answer,
You can remove the colour bar on the right by using .
colorbar('off');
That is by using the following code, you will be able to see a clean plot of the spectrogram output and save the plot in the current location with the name spect01.png.
set(gca, 'Visible', 'off');
colorbar('off');
saveas(gcf,'spect01.png');
Here gcf return the handle of the current figure. ![WLAN 802.11b407.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/220656/WLAN%20802.11b407.png)
![WLAN 802.11b407.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/220656/WLAN%20802.11b407.png)
1 Commento
Vedere anche
Categorie
Scopri di più su Convert Image Type in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!