limits of latitude - longitude
Show older comments
I had a netCDF file comprising of SST data . I plotted a graph using pcolor but now i have to plot same data for a shorter location, i have latitude longitude limits but dont know how to make plot for that specific lat lon limits . Pls help , I am attaching my initial plot
1 Comment
Arnav Gupta
on 7 Jun 2022
Answers (2)
KSSV
on 7 Jun 2022
0 votes
4 Comments
Arnav Gupta
on 7 Jun 2022
KSSV
on 7 Jun 2022
dx = min(unique(long)) ; % resolution along lon
dy = min(unique(lat)) ; % resolution along lat
xi = 0:dx:360 ;
yi = 80:dy:50 ;
[Xi,Yi] = meshgrid(xi,yi) ;
sst_marchi = interp2(longg,latg,sst_march,Xi,Yi) ;
Arnav Gupta
on 7 Jun 2022
KSSV
on 7 Jun 2022
Thats fine..check the range or format of the lat, lon.
% if you just want to show data in specific extent, set the axis limit as follows after ploting all data
ylim([-80 -50])
% if you want to plot data in specific extent, change your pcolor line as follows
sub = longg > -80 & longg < -50;
pcolor(longg(sub),latg(sub),sst_march(sub));
Categories
Find more on NetCDF in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!