linkaxes on logarithmic scale is off
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hey guys,
I'm making a 4x4 subplot, with each plot having a log x axis. I use linkaxis to align everything (like I normally do in similar situations), but for some reason now with the log scale it's weird. The XLim property is the same for each plot, but for some reason some plots are off (see attached picture). The plots that are off are always the ones with higher x-values. I noticed the XTicks are different, but when setting these the same for all subplots the problem still persists. (Note: the attached picture is after setting XTicks the same for all plots)
Am I missing some log-scale propertie that should fix this? Googling this behavior came up blank, so I'm not so sure what's going on here. Any tips are appreciated!
Code snippet:
% kernel density plot
c=1;
figure;
for idx = 1:numel(areas)
for jdx = 1:numel(areas)
h(c) = subplot(size(data,1),size(data,2),c);
if idx == jdx; c=c+1; axis off; continue; end % skip diagonal
[f,xi] = ksdensity(data{idx,jdx});
semilogx(xi,f);
grid minor;
c=c+1;
end
end
linkaxes(h)
[h.XTick] = deal([10 100 1000]);
0 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!