Rank: 98872 based on 0 downloads (last 30 days) and 0 file submitted
photo

Giovanni

E-mail
Company/University
Penn State University

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Giovanni
Updated File Comments Rating
16 Aug 2012 tight subplot Fills the figure with axes subplots with easily adjustable margins and gaps between the axes. Author: Pekka Kumpulainen

This is a great script. I'm experiencing a bug that makes my ticks disappear. Here's a sample:

figure('position',[100 100 1000 600])
ha=tight_subplot(1,3,[.02,.02],[.12,.08],[.1,.02]);
for a=ha'
hold(a,'all')
box(a,'on')
xlim(a,[.1 10])
ylim(a,[-90 10])
end
set(ha,'xscale','log','fontsize',fontSize,'ytick',-100:10:20,'yticklabel',[],'yminortick','on')
set(ha(1),'yticklabel',-100:10:20)
% 1
scatter(ha(1),x11,10*log10(y11),30,[0 .5 0],'x');
scatter(ha(1),x12,10*log10(y12),30,[0 0 1],'filled');
% 2
scatter(ha(2),x21,10*log10(y21),30,[0 .5 0],'x');
scatter(ha(2),x22,10*log10(y22),30,[0 0 1],'filled');
% 3
scatter(ha(3),x31,10*log10(y31),30,[0 .5 0],'x');
scatter(ha(3),x32,10*log10(y32),30,[0 0 1],'filled');

I would expect to see xticks at .1, 1 and 10, but on my system they simply disappear. If I tried and add them manually the log scale gets screwed up, so there's gotta be another way around. I'm using Matlab R2012a.
Thanks!

Contact us