linkaxes on logarithmic scale is off
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!