Plotting data from an ASCII file (script)

Example plot of ‘Pleth’ and ‘ECG1’ from an ascii file.

 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 import numpy as np
 import pandas as pd
 import matplotlib.pyplot as plt

 #Remember to change path
 df = pd.read_table(r"D:\FILES\Desktop\Dissertation ICL\OUCRU\01NVa_Dengue\Adults\01NVa-003-2001\Monitor\01NVa-003-2001waves.asc",header=1)

 #Visualising Data
 df

 #Plotting Data
 ax = plt.gca()

 df[:1000000].plot(kind='line',x='Time',y='ECG1',ax=ax)
 df[:1000000].plot(kind='line',x='Time',y='Pleth', color='red', ax=ax)

 plt.show()

Total running time of the script: ( 0 minutes 0.000 seconds)

Gallery generated by Sphinx-Gallery