Geoshow with MLT instead of longitude

16 次查看(过去 30 天)
Hi all,
I was trying plot energy distribution of ions as a Latitude-magnetic local time (MLT) plot above Antartica.
I have the data in Latitude-MLT co-ordinates so wanted to overplot this on top of something similar to a geoplot with coaslines outlined as well. This is what I have tried:
all_data = load('struct.mat');
all_data = all_data.struct;
lat = all_data.lat;
mlt = all_data.mlt;
heat = all_data.heat;
load coastlines
worldmap([-90,-40],[-180,100])
sc = scatterm(lat,mlt,75,heat,'filled','s');
geoshow(coastlat,coastlon,"DisplayType","polygon", "FaceColor", 'none', "EdgeColor", 'k');
colormap('parula')
caxis([0 40000])
col = colorbar();
This would however give me a plot that looks like the above but I would like to have the plot with MLT as the label that runs from 0-24 instead of longitude running from -180 to +180. I believe this is because the worldmap and geoshow have co-ordinates as latitude and longitude but I do not know how to change the longitude values to MLT values so that the plot accurately reflects the MLT values.
Ideally, I am looking for something like the figures 1, 2, 3 in the attached sample_plots.zip (obtained from - http://vt.superdarn.org/plot/quickconvection). Those figures are Latitude-MLT plots with the Antartica coastlines overplotted on top as well. Additionally, as time passes Antartica should rotate in the Latitude-MLT co-ordinate grid as seen in those figures.
Thanks for any advice or help!

采纳的回答

Austin M. Weber
Austin M. Weber 2024-2-8
This does not completely resolve your problem, but it may be helpful to get you started:
% Load your data
all_data = load('struct.mat');
all_data = all_data.struct;
lat = all_data.lat;
mlt = all_data.mlt;
heat = all_data.heat;
% Plot your data in polar coordinates instead of geographic axes (because I
% do not think geographic axes support MLT)
figure(1)
polarscatter(mlt,lat,40,heat,"filled",'s',...
'MarkerFaceAlpha',0.6,...
'MarkerEdgeAlpha',0.01)
colormap('parula')
caxis([0 40000])
cb=colorbar;
thetaticklabels(cellstr(string(linspace(0,22,12))+"MLT")) % Change the "longitude" labels to MLT
pax=gca;
pax.RDir="reverse"; % Flip the inner tick marks so that 90 degrees South is at the origin
pax.RTickLabel = []; % Remove the inner tick labels
% Import coastline data for drawing Antarctica
load coastlines
% Find the index positions for Antartica in the coastline data sets
idx_180 = [find(-180 == coastlon,1,'first'),...
find(180 == coastlon,1,'first')];
% Extract the coordinates for the Antaractica coastline
polar_lon = coastlon(idx_180(1):idx_180(2));
polar_lat = coastlat(idx_180(1):idx_180(2));
% Add Antarctic coastline to the polar projection
hold on
pplt=polarplot(deg2rad(normalize(polar_lon,'Range',[0 360])),...
-polar_lat,'.'); % "longitude" must be in radians, and I normalized
% the data from 0 to 360 because otherwise the range is -180 to 180,
% which is not the degrees of a circle
pplt.Color = 'w';
hold off
______________________________________________________________________________________________________
The issue with what I've done above is that I do not know how magnetic local time works, so the label positions for 0MLT through 22MLT may not be where you expect them to be. Additionally, I am not certain whether the size of Antarctica is scaled correctly relative to your data. You may have to normalize polar_lat to a different range.
Hopefully you find this helpful.
  2 个评论
Mathan
Mathan 2024-2-8
Hi Austin,
Thank you for the lead - infact this is something I was looking forward to as well. I can try the make modifications to this to suit my needs, and I am happy to accept the answer.
Thanks
Austin M. Weber
Austin M. Weber 2024-2-8
Fantastic! I'm happy that my answer might be helpful. Best of luck with any future modifications!
-AMW

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geographic Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by