Skip to content

Instantly share code, notes, and snippets.

@yueyericardo
Created June 18, 2019 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yueyericardo/1dd5587a628e84e7be24a275fecf6274 to your computer and use it in GitHub Desktop.
Save yueyericardo/1dd5587a628e84e7be24a275fecf6274 to your computer and use it in GitHub Desktop.
plt.figure(figsize=(15,8))
plt.subplot(4, 1, 1)
plt.plot(OH.iloc[:,0],OH.iloc[:,1])
plt.ylim(0, 3.5e-18)
plt.xlim(3580, 3900)
plt.title('R branch', fontsize=16, pad=-20)
plt.subplot(4, 1, 2)
plt.plot(OH.iloc[:,0],OH.iloc[:,1])
plt.ylim(0, 3.5e-18)
plt.xlim(3580, 3900)
for i in range(len(trans)):
plt.text(trans[i],inten[i],'%d'%i)
plt.subplot(4, 1, 3)
plt.plot(OH.iloc[:,0],OH.iloc[:,1])
plt.ylim(0, 3.5e-18)
plt.xlim(3580, 3900)
for i in range(len(trans_clean)):
plt.text(trans_clean[i],inten_clean[i],'%d'%i)
plt.subplot(4, 1, 4)
plt.plot(OH.iloc[:,0],OH.iloc[:,1])
plt.ylim(0, 3.5e-18)
plt.xlim(3580, 3900)
for i in range(len(trans_clean)):
if (i%2==0):
plt.text(trans_clean[i]-3, inten_clean[i]+0.1e-18, '%.1f'%(i/2+0.5), color='red')
else:
plt.text(trans_clean[i]-3, inten_clean[i]+0.5e-18, '%.1f'%((i+1)/2 +0.5), color='green')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment