How to save figure as appears on the screen? with the same aspect ratio, and font size, etc. ?
    6 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
figure('units','normalized','outerposition',[0 0 .5 1]);
hist(rand(100));
saveas(gcf,sprintf('%s.png',mfilename));
For example in this case the output png is not a portrait format, however the figure window is.
0 Commenti
Risposte (2)
  thomas weldon
 il 21 Giu 2018
        
      Modificato: Walter Roberson
      
      
 il 25 Giu 2018
  
      Try this:
 fig=gcf;ax=fig.CurrentAxes;fig.Color='w';fig.OuterPosition=fig.InnerPosition;
0 Commenti
Vedere anche
Categorie
				Scopri di più su Startup and Shutdown 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!


