Move Longitude axis above scatterplot
显示 更早的评论
Below is my matlab code that plots locations in a region of interest:
axis = geoaxes('basemap','satellite');
S = struct(axis);
hold on
lat = normrnd(29,0.2,[1,50]);
lon = normrnd(-90,0.2,[1,50]);
geoscatter(axis,lat,lon,30,'.')
The lat/lon data is dummy data for reproducibility purposes. I want to put the Longitude axis above the scatterplot because I will eventually put a colorbar right below the figure. When using the plot function, I understand the following line can put the X-axis on top of a plot:
set(gca,'XAxisLocation','top','YAxisLocation','left')
However, I can't find the same capabilitiy for the geoscatter function.
Any suggestions on how I can accomplish the my goal?
4 个评论
Joseph Cheng
2021-6-2
would like to test but an ugly way would to follow:
what was set here...
dpb
2021-6-2
Doesn't appear to be a visible property according to https://www.mathworks.com/help/matlab/ref/matlab.graphics.axis.decorator.geographicruler-properties.html
It's either kludge to draw manually as I presume the above link does or see if there is a useful hidden property that will let you get at the axes location property. Yair's FEX submission <Get undocumented object properties> is invaluable for finding these to workaround the warts.
Sometimes, however, there just isn't anything accessible, unfortunately, despite what see like obvious needs for users to be able to control I don't have necessary toolbox to try...
Debbie Green
2021-6-3
编辑:Debbie Green
2021-6-3
dpb
2021-6-3
Was afraid of that...why Mathworks has developed such a penchant recently for these opaque/dark graphics objects that hide useful/needed properties on the basis apparently of "Mother knows best!" is maddening and wastes untold numbers of users' hours more productively spent doing the research/productive work rather than fighting the toolset.
I'd suggest to submit enhancement request for the feature (and any others you run into along the way).
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Interact with Maps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
