Jul-01-2019, 04:52 PM
Hi all,
I am new to the python world and I was able to make some progress with my code. I have a relative large dataframe with around of 400+ rows. What I am trying to do is to split based on a chunkSize to create set of four sublots (I picked four subplots [2,2] since I believe that are still presentable on a big screen.
What I need your help is on how to make 2X2 subplots and also save them on the file on the place I mark you with comments below in the code.
I am new to the python world and I was able to make some progress with my code. I have a relative large dataframe with around of 400+ rows. What I am trying to do is to split based on a chunkSize to create set of four sublots (I picked four subplots [2,2] since I believe that are still presentable on a big screen.
What I need your help is on how to make 2X2 subplots and also save them on the file on the place I mark you with comments below in the code.
totalRows=data_1.shape[0] data_1.drop(data_1.index[0],inplace=True) # data_1 contains a single erroeneous measurement. remove it chunkSize=300 # set chunk size so it creates at least for figures selectPeriods=chunkSize//3 # three periods are showed. for i in range(1,totalRows,chunkSize): print(i) # Here I need help #if ((i// chunkSize) % 4==0):# when this is zero try a new set of subplots. It gets values of 0,1,2,3 #then start a new set of four subplots plt.figure() plt.plot(data_1['All-Latitude'][i:i+selectPeriods].values, data_1['All-Longitude'][i:i+selectPeriods].values,color="red") plt.xlim(min(data_1['All-Latitude']),max(data_1['All-Latitude'])) plt.ylim(min(data_1['All-Longitude']), max(data_1['All-Longitude']))