Remove white space around map
Display a map of Africa. Notice the white space between the map frame and the edge of the axes box.
axesm('miller','maplatlim',[-40 40],'maplonlim',[-20 60]) framem; gridm; mlabel; plabel load coast plotm(lat, long)
Now use tightmap to reduce the wasted space:
The axis limits are fixed. If a change in the projection parameters changes the size or position of the map display within the projected coordinate system, execute tightmap again. Also note that tightmap needs to be re-applied following any call to setm that causes projected map objects to be re-projected.
The tightmap function performs no action on a 'globe' map axes.