Matlab Cropping Plots to remove whitespace
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Adin
el 20 de Abr. de 2014
Comentada: Dr. Erol Kalkan, P.E.
el 12 de Oct. de 2018
I want to adjust the amount of whitespace that is shown when plots are generated. I found this command to do just that:
set(gca,'LooseInset',get(gca,'TightInset'))
But this doesn't work that well when I add axis labels. When I have a plot without axis labels it's fine, it looks like this:
But when I add labels it does this:
You can't see it all that well but there is a lot of white space left of the yaxis label. I want to crop it down to the bare minimum, how do I do it?
0 comentarios
Respuesta aceptada
lvn
el 20 de Abr. de 2014
On the fileexchange there are a lot of functions out there that can do this for you. I use for instance spaceplots http://www.mathworks.com/matlabcentral/fileexchange/35464-spaceplots , which you should call after your figure is complete (with axis labels and all). That function modifies white space between subplots but also left top bottom and right of the whole figure (which is what you want).
0 comentarios
Más respuestas (1)
Marc Jakobi
el 15 de Sept. de 2016
I just finished working on a function that attemts to automatically solve this problem (without messing up colorbars, labels, etc.)
1 comentario
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!