How to plot subplots in one figure to showing 4 seasons of chlorophyll-a data?
1 回表示 (過去 30 日間)
古いコメントを表示
I have 4 Chlorophyll-a datasets as18*3, 18*5,18*2 and 18*2 double datasets. I want to plot subplots in one figure to showing 4 seasons of chlorophyll-a data in Matlab. I tried to 1 plot. But after run this code in Matlab the map was displayed in shifted up and down and not displaying colors. How to resolve this?
% Create a new figure
figure;
% Add the NEM subplot
subplot(2,2,1);
imagesc(lon,lat,NEM);
colormap jet;
hold on
% color axis limits
caxis ([0 2]);
m_coast('patch',[.7 .7 .7]);
m_grid;
colorbar
title('Northeast monsoon')
0 件のコメント
回答 (1 件)
Walter Roberson
2023 年 4 月 24 日
Try
% Create a new figure
fig = figure;
% Add the NEM subplot
ax = subplot(fig, 2, 2, 1);
imagesc(ax, lon, lat, NEM);
colormap(ax, jet);
hold(ax, 'on');
m_coast('patch', [.7 .7 .7], 'Parent', ax);
m_grid('axes', ax);
% color axis limits
caxis(ax, [0 2]);
colorbar(ax)
title(ax, 'Northeast monsoon')
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!