I want to plot some data in a polar plot and the code I wrote works great if I import the data from a simple txt file with any headers or text in it. The problem is that I get the data from an automatic device in a format as follow:
Hello word Hi Again Angle [deg] Level of radiation -180 -1 -175 -8.17 -170 -15 -165 -13.67
At the moment, I import the data with the following code, but if there is text or headers doesn't work:
for line in open(Data.txt, 'r'): values = [float(s) for s in line.split()] Position.append(values) Level.append(values) NormalizedLevel.append(values)
My goal is to have the first two rows stored as a text to be displayed somewhere in the plot, and then the following three columns stored in three different arrays. If possible, the name of each array should be the header of the column, but if it is not possible it is not a big issue!
Any ideas? Thanks in advance!