How to display an imagesc plot and mapshow plot with same geographic direction?

49 views (last 30 days)
countary boundary
Here, I have attached three images ,countary border shape lines(top), data plot(middle) and both mereged (bottom). I am facing problem that countary border shape lines gets inverted when it is plotted with my data_plot(imagesc).
I here attached my code which i am using.
sed_thick2=xlsread('data87972030.xlsx'); %data
sed_thick3=sed_thick2(:,5);
sed_thick4=reshape(sed_thick3,301,301);
sed_thick=sed_thick4';
csia21=sed_thick;
m_data1= reshape(csia21',90601,1);
X= [87 97];
Y=[20 30];
im= imagesc(X,Y,csia21,'Interpolation', 'bilinear');
im.AlphaData = 1;
hold on
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x5=87:0.033333333:97;
y5=20:0.033333333:30;
minx = round(min(csia21(:)),1);
maxx = round(max(csia21(:)),1);
levels = minx:5:maxx;
levels2=round(levels);
[X5,Y5] = meshgrid(x5,y5);
[C,h]=contour(X5,Y5,csia21,'linewidth',0.01,'LineColor',[0,0,0]+0.4);
clabel(C,h,'FontSize',6);
hold on
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
S = shaperead('IND_adm1.shp');
xLim = [87,97];
yLim = [20,30];
mapshow(S,'FaceColor', 'none','LineWidth',0.5);
set(gca,'XLim', xLim, 'YLim',yLim);
xlabel('longitude(deg.)')
ylabel('latitude(deg.)')
xtickformat('%g\x00B0 E')
ytickformat('%g\x00B0 N')
xticks(87:2:97)
yticks(20:2:30)
hax = gca;
hax.YTickLabel = flipud(hax.YTickLabel);
hold off
colormap jet
grid on
Anyone please suggest me how to get both data plot and boundary line in same direction.
  2 Comments

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!