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!