global figure sizes and subplot adjust values
This commit is contained in:
@@ -9,7 +9,7 @@ for k = 1:3
|
||||
rand(1, n)
|
||||
end
|
||||
|
||||
% serial corraltion at lag 1:
|
||||
% serial correlation at lag 1:
|
||||
n = 10000;
|
||||
x = rand(n, 1);
|
||||
r1 = corr(x(1:end-1), x(2:end));
|
||||
|
||||
@@ -15,9 +15,8 @@ if __name__ == "__main__":
|
||||
indices = np.arange(n)
|
||||
data = sigma*rng.randn(len(indices))+mu
|
||||
|
||||
fig = plt.figure(figsize=cm_size(16.0, 6.0))
|
||||
spec = gridspec.GridSpec(nrows=1, ncols=2, width_ratios=[3, 1],
|
||||
left=0.12, bottom=0.23, right=0.97, top=0.96, wspace=0.08)
|
||||
fig = plt.figure()
|
||||
spec = gridspec.GridSpec(nrows=1, ncols=2, width_ratios=[3, 1], left=0.12, wspace=0.08)
|
||||
ax1 = fig.add_subplot(spec[0, 0])
|
||||
show_spines(ax1, 'lb')
|
||||
ax1.scatter(indices, data, c=colors['blue'], edgecolor='white', s=50)
|
||||
|
||||
@@ -20,9 +20,9 @@ if __name__ == "__main__":
|
||||
lags = np.arange(-maxl, maxl+1, 1)
|
||||
corrs = [np.corrcoef(x[maxl:-maxl-1-l], x[maxl+l:-maxl-1])[0, 1] for l in lags]
|
||||
|
||||
fig = plt.figure(figsize=cm_size(16.0, 11.0))
|
||||
fig = plt.figure(figsize=cm_size(figure_width, 1.8*figure_height))
|
||||
spec = gridspec.GridSpec(nrows=2, ncols=2,
|
||||
left=0.10, bottom=0.12, right=0.98, top=0.97,
|
||||
left=0.11, bottom=0.12, right=0.98, top=0.97,
|
||||
wspace=0.4, hspace=0.6)
|
||||
|
||||
ax = fig.add_subplot(spec[0, 0])
|
||||
|
||||
@@ -20,9 +20,8 @@ if __name__ == "__main__":
|
||||
xx = np.linspace(xmin, xmax, 200)
|
||||
yy = boltzmann(xx, x0, k)
|
||||
|
||||
fig = plt.figure(figsize=cm_size(16.0, 6.0))
|
||||
spec = gridspec.GridSpec(nrows=1, ncols=2,
|
||||
left=0.12, bottom=0.23, right=0.97, top=0.96, wspace=0.4)
|
||||
fig = plt.figure()
|
||||
spec = gridspec.GridSpec(nrows=1, ncols=2, left=0.1, wspace=0.4)
|
||||
ax1 = fig.add_subplot(spec[0, 0])
|
||||
show_spines(ax1, 'lb')
|
||||
ax1.plot(xx, yy, colors['red'], lw=2)
|
||||
|
||||
Reference in New Issue
Block a user