[simulations] updated plots
This commit is contained in:
parent
9769d5e94f
commit
d7cda9567f
@ -34,7 +34,7 @@ minorline = {'linestyle': '-', 'linewidth': lwthin}
|
|||||||
largemarker = {'marker': 'o', 'markersize': 9, 'markeredgecolor': colors['white'], 'markeredgewidth': 1}
|
largemarker = {'marker': 'o', 'markersize': 9, 'markeredgecolor': colors['white'], 'markeredgewidth': 1}
|
||||||
smallmarker = {'marker': 'o', 'markersize': 6, 'markeredgecolor': colors['white'], 'markeredgewidth': 1}
|
smallmarker = {'marker': 'o', 'markersize': 6, 'markeredgecolor': colors['white'], 'markeredgewidth': 1}
|
||||||
largelinepoints = {'linestyle': '-', 'linewidth': lwthick, 'marker': 'o', 'markersize': 10, 'markeredgecolor': colors['white'], 'markeredgewidth': 1}
|
largelinepoints = {'linestyle': '-', 'linewidth': lwthick, 'marker': 'o', 'markersize': 10, 'markeredgecolor': colors['white'], 'markeredgewidth': 1}
|
||||||
smalllinepoints = {'linestyle': '-', 'linewidth': lwthin, 'marker': 'o', 'markersize': 7, 'markeredgecolor': colors['white'], 'markeredgewidth': 1}
|
smalllinepoints = {'linestyle': '-', 'linewidth': 1.4, 'marker': 'o', 'markersize': 7, 'markeredgecolor': colors['white'], 'markeredgewidth': 1}
|
||||||
filllw = 1
|
filllw = 1
|
||||||
fillec = colors['white']
|
fillec = colors['white']
|
||||||
fillalpha = 0.4
|
fillalpha = 0.4
|
||||||
|
@ -19,7 +19,7 @@ if __name__ == "__main__":
|
|||||||
spec = gridspec.GridSpec(nrows=1, ncols=2, width_ratios=[3, 1], wspace=0.08,
|
spec = gridspec.GridSpec(nrows=1, ncols=2, width_ratios=[3, 1], wspace=0.08,
|
||||||
**adjust_fs(fig, left=6.0))
|
**adjust_fs(fig, left=6.0))
|
||||||
ax1 = fig.add_subplot(spec[0, 0])
|
ax1 = fig.add_subplot(spec[0, 0])
|
||||||
ax1.scatter(indices, data, c=colors['blue'], edgecolor='white', s=50)
|
ax1.plot(indices, data, **psAm)
|
||||||
ax1.set_xlabel('Index')
|
ax1.set_xlabel('Index')
|
||||||
ax1.set_ylabel('Weight', 'kg')
|
ax1.set_ylabel('Weight', 'kg')
|
||||||
ax1.set_xlim(-10, 310)
|
ax1.set_xlim(-10, 310)
|
||||||
@ -29,10 +29,10 @@ if __name__ == "__main__":
|
|||||||
ax2 = fig.add_subplot(spec[0, 1])
|
ax2 = fig.add_subplot(spec[0, 1])
|
||||||
xx = np.arange(0.0, 350.0, 0.5)
|
xx = np.arange(0.0, 350.0, 0.5)
|
||||||
yy = st.norm.pdf(xx, mu, sigma)
|
yy = st.norm.pdf(xx, mu, sigma)
|
||||||
ax2.plot(yy, xx, color=colors['red'], lw=2)
|
ax2.plot(yy, xx, **lsBm)
|
||||||
bw = 20.0
|
bw = 20.0
|
||||||
h, b = np.histogram(data, np.arange(0, 401, bw))
|
h, b = np.histogram(data, np.arange(0, 401, bw))
|
||||||
ax2.barh(b[:-1], h/np.sum(h)/(b[1]-b[0]), fc=colors['yellow'], height=bar_fac*bw, align='edge')
|
ax2.barh(b[:-1], h/np.sum(h)/(b[1]-b[0]), height=bar_fac*bw, align='edge', **fsC)
|
||||||
ax2.set_xlabel('Pdf', '1/kg')
|
ax2.set_xlabel('Pdf', '1/kg')
|
||||||
ax2.set_xlim(0, 0.012)
|
ax2.set_xlim(0, 0.012)
|
||||||
ax2.set_xticks([0, 0.005, 0.01])
|
ax2.set_xticks([0, 0.005, 0.01])
|
||||||
|
@ -24,32 +24,28 @@ if __name__ == "__main__":
|
|||||||
spec = gridspec.GridSpec(nrows=2, ncols=2, **adjust_fs(fig))
|
spec = gridspec.GridSpec(nrows=2, ncols=2, **adjust_fs(fig))
|
||||||
|
|
||||||
ax = fig.add_subplot(spec[0, 0])
|
ax = fig.add_subplot(spec[0, 0])
|
||||||
ax.plot(indices, x1, c=colors['blue'], lw=1, zorder=10)
|
ax.plot(indices, x1, zorder=10, **lpsAm)
|
||||||
ax.scatter(indices, x1, c=colors['blue'], edgecolor='white', s=50, zorder=20)
|
|
||||||
ax.set_xlabel('Index')
|
ax.set_xlabel('Index')
|
||||||
ax.set_ylabel('Random number')
|
ax.set_ylabel('Random number')
|
||||||
ax.set_xlim(-1.0, n+1.0)
|
ax.set_xlim(-1.0, n+1.0)
|
||||||
ax.set_ylim(-0.05, 1.05)
|
ax.set_ylim(-0.05, 1.05)
|
||||||
|
|
||||||
ax = fig.add_subplot(spec[0, 1])
|
ax = fig.add_subplot(spec[0, 1])
|
||||||
ax.plot(indices, x2, c=colors['blue'], lw=1, zorder=10)
|
ax.plot(indices, x2, zorder=10, **lpsAm)
|
||||||
ax.scatter(indices, x2, c=colors['blue'], edgecolor='white', s=50, zorder=20)
|
|
||||||
ax.set_xlabel('Index')
|
ax.set_xlabel('Index')
|
||||||
ax.set_ylabel('Random number')
|
ax.set_ylabel('Random number')
|
||||||
ax.set_xlim(-1.0, n+1.0)
|
ax.set_xlim(-1.0, n+1.0)
|
||||||
ax.set_ylim(-0.05, 1.05)
|
ax.set_ylim(-0.05, 1.05)
|
||||||
|
|
||||||
ax = fig.add_subplot(spec[1, 1])
|
ax = fig.add_subplot(spec[1, 1])
|
||||||
ax.plot(indices, x3, c=colors['blue'], lw=1, zorder=10)
|
ax.plot(indices, x3, zorder=10, **lpsAm)
|
||||||
ax.scatter(indices, x3, c=colors['blue'], edgecolor='white', s=50, zorder=20)
|
|
||||||
ax.set_xlabel('Index')
|
ax.set_xlabel('Index')
|
||||||
ax.set_ylabel('Random number')
|
ax.set_ylabel('Random number')
|
||||||
ax.set_xlim(-1.0, n+1.0)
|
ax.set_xlim(-1.0, n+1.0)
|
||||||
ax.set_ylim(-0.05, 1.05)
|
ax.set_ylim(-0.05, 1.05)
|
||||||
|
|
||||||
ax = fig.add_subplot(spec[1, 0])
|
ax = fig.add_subplot(spec[1, 0])
|
||||||
ax.plot(lags, corrs, c=colors['red'], lw=1, zorder=10)
|
ax.plot(lags, corrs, zorder=10, **lpsBm)
|
||||||
ax.scatter(lags, corrs, c=colors['red'], edgecolor='white', s=50, zorder=20)
|
|
||||||
ax.set_xlabel('Lag')
|
ax.set_xlabel('Lag')
|
||||||
ax.set_ylabel('Serial correlation')
|
ax.set_ylabel('Serial correlation')
|
||||||
ax.set_xlim(-maxl-0.5, maxl+0.5)
|
ax.set_xlim(-maxl-0.5, maxl+0.5)
|
||||||
|
@ -23,8 +23,8 @@ if __name__ == "__main__":
|
|||||||
fig = plt.figure()
|
fig = plt.figure()
|
||||||
spec = gridspec.GridSpec(nrows=1, ncols=2, **adjust_fs(fig, left=4.5))
|
spec = gridspec.GridSpec(nrows=1, ncols=2, **adjust_fs(fig, left=4.5))
|
||||||
ax1 = fig.add_subplot(spec[0, 0])
|
ax1 = fig.add_subplot(spec[0, 0])
|
||||||
ax1.plot(xx, yy, **ls['A1'])
|
ax1.plot(x, y, **psAm)
|
||||||
ax1.scatter(x, y, c=colors['blue'], edgecolor='white', s=50)
|
ax1.plot(xx, yy, **lsB)
|
||||||
ax1.set_xlabel('Hair deflection', 'nm')
|
ax1.set_xlabel('Hair deflection', 'nm')
|
||||||
ax1.set_ylabel('Conductance', 'nS')
|
ax1.set_ylabel('Conductance', 'nS')
|
||||||
ax1.set_xlim(-20, 20)
|
ax1.set_xlim(-20, 20)
|
||||||
@ -35,10 +35,10 @@ if __name__ == "__main__":
|
|||||||
ax2 = fig.add_subplot(spec[0, 1])
|
ax2 = fig.add_subplot(spec[0, 1])
|
||||||
xg = np.linspace(-3.0, 3.01, 200)
|
xg = np.linspace(-3.0, 3.01, 200)
|
||||||
yg = st.norm.pdf(xg, 0.0, sigma)
|
yg = st.norm.pdf(xg, 0.0, sigma)
|
||||||
ax2.plot(xg, yg, **ls['A1'])
|
ax2.plot(xg, yg, **lsB)
|
||||||
bw = 0.25
|
bw = 0.25
|
||||||
h, b = np.histogram(y-boltzmann(x, x0, k), np.arange(-3.0, 3.01, bw))
|
h, b = np.histogram(y-boltzmann(x, x0, k), np.arange(-3.0, 3.01, bw))
|
||||||
ax2.bar(b[:-1], h/np.sum(h)/(b[1]-b[0]), fc=colors['yellow'], width=bar_fac*bw, align='edge')
|
ax2.bar(b[:-1], h/np.sum(h)/(b[1]-b[0]), width=bar_fac*bw, align='edge', **fsC)
|
||||||
ax2.set_xlabel('Residuals', 'nS')
|
ax2.set_xlabel('Residuals', 'nS')
|
||||||
ax2.set_ylabel('Pdf', '1/nS')
|
ax2.set_ylabel('Pdf', '1/nS')
|
||||||
ax2.set_xlim(-2.5, 2.5)
|
ax2.set_xlim(-2.5, 2.5)
|
||||||
|
Reference in New Issue
Block a user