how do i make the output of axesm fill more of a figure window?
8 次查看(过去 30 天)
显示 更早的评论
I have a high aspect ratio axesm() setup that plots the world from -60 to 60 degrees in latitude. The figure it loads into is also high aspect ratio, but the axesm() output generated is much smaller than the figure. When I zoom (which we'll be doing all the time), the displayed data is clipped to the smaller original axesm window. This wastes a whole lot of screen real estate. I don't see any Position() controls for axesm(). Help?
1 个评论
dpb
2015-1-2
Don't have the mapping toolbox so can't 'spearmint here, but reading the doc for axesm indicates it's just a higher-level object wrapping a standard axes. Ergo, use get, set on the actual axes and figure properties to adjust those that aren't specific to the mapping properties themselves. Probably will take some trial and error to figure out what want where, but the position properties are associated with those underlying objects.
采纳的回答
dpb
2015-1-4
编辑:dpb
2015-1-5
You're misinterpreting what the doc is saying...it doesn't say the axesm function object includes all the possible named properties of an axes object as inputs that can be passed on or modified/retrieved but that it is a higher-level abstraction of an axes with a specific set of properties as enumerated in the documentation. If they're not enumerated there, you can't get to them via axesm.
To get to the 'position' property you have to retrieve the handle of the actual underlying axes object and use set/get on it.
So, something like
hMap=axesm(...); % create the map axes object
hAx=gca; % retrieve the handle of the axes itself
pAx=get(hAx,'position'); % and the position vector
Now, from here modify pAx as desired and then set it
set(hAx,'position',pAxMungedUponToHeartsContent);
Same idea for any other axes property not reflected in the map object.
Now, why TMW didn't include the underlying axes handle as either a property or an optional return value you'll have to ask them; seems like a logical thing to have done. I suppose they didn't think there'd be much demand for anything except the defaults. Would seem to be a logical extension request.
0 个评论
更多回答(2 个)
Chad Greene
2015-1-4
Not sure if this is what you're looking for, but the axis tight command works with maps.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geographic Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!