Hi,
I am trying to overlay two maps. The 1st one is a world map of Sen's slope. The 2nd one is a world map of Mann-Kendall test significance. The problem is when i overlay map 2 on map 1, the high density of the dots in map 2 (markers) clutter the final map. So in the final map, information of map 1 (Sen's slope) is not clear. Please see the attached final map (grey dots are too dense, so underlying colours are not clear).
Could somone please kindly suggest me a method to reduce the densisty of the dots (markers) in map 2, so that the final map looks clearer. Ideally, I would like to have some relatively large few dots instead of small dense clusters of dots.
I have added the code below.
Thanks in advance
tStart = tic;
load('SSandmMK.mat','De_Martonne_SS_map') % load the aridity database name
load('SSandmMK.mat','De_Martonne_mMK_map') % load the mMK test database name
load('Lati.mat') % load latitude data
load('Longi.mat') % load longitude data
lon = double(varname_0_data'); % conversion to double
lat = flip(double(varname_1_data)); % conversion to double and flipping
Lon = lon(ones(1,360),:); % creation of a mesh with lon data
Lat = lat(:,ones(1,720)); % creation of a mesh with lat data
SEN = De_Martonne_SS_map;
H = De_Martonne_mMK_map;
LL = -0.15; % color bar lower limit
HL = 0.15; % color bar upper limit
STP = 0.03; % color bar step
SEN = double(SEN); % conversion to double
H = double(H); % conversion to double
figure(1) % figure 1 sens slope
latax=-90:1:90; % lati range
lonax=-179.99:1:179.99; % lon range
ax = worldmap([latax(1),latax(end)],[lonax(1),lonax(end)]); % load world map
setm(ax,'mlabelparallel',-90);
setm(gca,'FLineWidth',1,'Grid','on','GLineWidth', 1.5, 'PLineLocation', [-90,-45,0,45,90],'PLabelRound', 0, 'PLineLocation', [-179.99,-135,-90,-45,0,45,90,135,179]);
setm(gca,'plabellocation',[-90,-45,0,45,90]);
setm(gca,'mlabellocation',[-179.99,-135,-90,-45,0,45,90,135,179]);
gridm('mlinelocation',[-179.99,-135,-90,-45,0,45,90,135,179.9],'plinelocation',[-90,-45,0,45,90]);
load coastlines
plotm(coastlat,coastlon)
hold on
e1 = rot90(pcolorm(Lat,Lon,SEN),2);
cbh=colorbar('v');
set(cbh,'XTick',[LL:STP:HL])
colormap (flip(jet(10)))
caxis([LL HL])
title('Sens slope - De Martonne Aridity 1901-2019')
figure(2) % figure 2 sens slope significance from mMK test
latax=-90:1:90;
lonax=-179.99:1:179.99;
ax = worldmap([latax(1),latax(end)],[lonax(1),lonax(end)]);
setm(ax,'mlabelparallel',-90);
setm(gca,'FLineWidth',1,'Grid','on','GLineWidth', 1.5, 'PLineLocation', [-90,-45,0,45,90],'PLabelRound', 0, 'PLineLocation', [-179.99,-135,-90,-45,0,45,90,135,179]);
setm(gca,'plabellocation',[-90,-45,0,45,90]);
setm(gca,'mlabellocation',[-179.99,-135,-90,-45,0,45,90,135,179]);
gridm('mlinelocation',[-179.99,-135,-90,-45,0,45,90,135,179.9],'plinelocation',[-90,-45,0,45,90]);
hold on
H(H==0)=NaN;
%e2 = rot90(pcolorm(Lat,Lon,H),2);
e2 = rot90(plotm(Lat,Lon,H,'.', 'MarkerSize',0.001, 'MarkerEdgeColor',[0.5 0.5 0.5], 'MarkerFaceColor','none'));
%set(e2,'facealpha',0.1);
cbh=colorbar('v');
set(cbh,'XTick',[0:1:1])
colormap (flip(gray(2)))
caxis([0 1])
hold on
load coastlines
plotm(coastlat,coastlon)
title('Statistical significance of Sens slope - De Martonne Aridity 1901-2019')
% Overlaying figure 2 on figure 1
first_fig = figure(1);
second_fig = figure(2);
first_ax = findobj(first_fig, 'type', 'axes');
second_ax = findobj(second_fig, 'type', 'axes');
if length(first_ax) ~= 1 || length(second_ax) ~= 1
error('this code requires the two figures to have exactly one axes each');
end
ch2 = get(second_ax, 'children'); % direct children only and don't try to find the hidden ones
copyobj(ch2, first_ax);
set(gcf, 'Renderer', 'painters')
print -depsc -tiff -r300 -painters untitled.eps
tEnd = toc(tStart)