In [1]:
%pylab inline
rcParams['figure.figsize']=(10,8)
Populating the interactive namespace from numpy and matplotlib
In [2]:
points = 500
t=arange(0, points)
noise = random.randn(points)*300
fit = 4000*sin(t/40.)**2*exp(-t/200.)
raw = fit + noise
In [3]:
plot(t, fit, label='Fit')
plot(t, raw,'o', label='Raw data')
legend()
ylabel('Raw fluorescence')
xlabel('Time')
savefig('img0.png',dpi=150, bbox_inches="tight")
In [4]:
plot(t, raw, 'o', label='Raw data', color='#0EA16A', alpha=0.75)
plot(t, fit, '#EF5915', lw=3, label='Fit')
legend()
ylabel('Raw fluorescence')
xlabel('Time')
savefig('img1.png',dpi=150, bbox_inches="tight")
In [5]:
plot(t, raw, 'o', label='Raw data', color='#0EA16A', mec='None', alpha=0.75,  ms=5)
plot(t, fit, '#EF5915', lw=3, label='Fit')
legend()
ylabel('Raw fluorescence')
xlabel('Time')
savefig('img2.png',dpi=150, bbox_inches="tight")
In [6]:
def myfig():
    fig = plt.figure()
    ax = fig.gca()
    ax.spines['right'].set_visible(False)
    ax.spines['top'].set_visible(False)
    ax.xaxis.set_ticks_position('bottom')
    ax.yaxis.set_ticks_position('left')
    return fig, ax
In [7]:
fig,ax = myfig()
ax.plot(t, raw, 'o', label='Raw data', color='#0EA16A', mec='None', alpha=0.75,  ms=5)
ax.plot(t,fit,'#EF5915',lw=3,label='Fit')
ax.legend()
ylabel('Raw fluorescence')
xlabel('Time')
savefig('img3.png',dpi=150, bbox_inches="tight")
In [8]:
rcParams['font.sans-serif']=['Fira Sans OT']
rcParams['font.size'] = 14
rcParams['legend.frameon']=False
rcParams['legend.numpoints']=3
rcParams['xtick.major.pad']=4
rcParams['ytick.major.pad']=5
rcParams['xtick.major.width']=1
rcParams['ytick.major.width']=1
rcParams['legend.fontsize']= 'medium'
In [10]:
fig,ax = myfig()
ax.plot(t, raw, 'o', label='Raw data', color='#0EA16A', mec='None', alpha=0.75,  ms=5)
ax.plot(t, fit,'#EF5915',lw=3,label='Fit')
ax.legend()
ylabel('Raw fluorescence')
xlabel('Time')
#grid()
savefig('img4.png',dpi=150, bbox_inches="tight")
In [95]:
 
In [11]:
rcParams['axes.facecolor']='f5f5f5'
rcParams['axes.edgecolor']="444444"
rcParams['grid.linestyle']='-'
rcParams['grid.alpha']=.8
rcParams['grid.color']='white'
rcParams['grid.linewidth']=2
rcParams['axes.axisbelow']= True
rcParams['axes.labelcolor']='444444'
rcParams['text.color']= '444444'
rcParams['xtick.color']= '444444'
rcParams['ytick.color']= '444444'
In [13]:
fig,ax = myfig()
ax.plot(t, raw, 'o', label='Raw data', color='#0EA16A', mec='None', alpha=0.75,  ms=5)
ax.plot(t, fit,'#EF5915',lw=3,label='Fit')
ax.legend()
ylabel('Raw fluorescence')
xlabel('Time')
grid()
savefig('img5.png',dpi=150, bbox_inches="tight")
In [ ]: