Change background color of figure when using worldmap
When using worldmap.m from the MATLAB Mapping toolbox, the default color of the background (aka the ocean) is 'none'. How can I ch开发者_运维问答ange this to a different color?
h = worldmap('World')
Using the findobj
and set
functions, you can location the background patch and then use set
to change the color.
h = worldmap('World')
p = findobj(h,'type','patch'); % Find background
set(p,'FaceColor',[1 1 1]); % Change background to white
精彩评论