title: Plot from Multiple CSV/Excel files in one figure with Python
body: <p>I already imported the csv files into python. The problem with append is when I plot it, the second file did not start from the top but continues from the last point of the first file. Here, let me show you the code and the figure.</p>
  
  <pre><code>import os
  import pandas as pd
  import matplotlib.pyplot as plt
  
  ### Set your path to the folder containing the .csv files
  PATH = "D:\\TUGAS\\TA\\TUYS\\Data TA dari Garuda\\Format CSV\\Hard Landing\\Format 1"
  
  ### Fetch all files in path
  fileNames = os.listdir(PATH)
  
  ### Filter file name list for files ending with .csv
  #fileNames = [file for file in fileNames if '.csv' in file]
  TES = pd.Series([])
  X = pd.Series([])
  
  ### Loop over all files
  for file in fileNames:
  
  ### Read .csv file and append to list
      df = pd.read_csv( file, skiprows=[0,1,3,4])
      df.columns = [column.replace(" ","_") for column in df.columns]
      df.columns = [column.replace("/","_") for column in df.columns]
      X = X.append(df)
  
  TES = TES.append(X)
  ### Create line for every file
  plt.plot(TES.DISTANCE_TO_THRESHOLD, TES.ALTITUDE_ABOVE_FIELD_ELEV)
  plt.ylabel("Altitude (ft)")
  plt.xlabel("Distance from threshold (nm)")
  plt.xlim(5,-2)
  plt.ylim(-50,1000)
  ### Generate the plot
  plt.show()
  </code></pre>
  
  <p>The figure :</p>
  
  <p><a href="https://i.stack.imgur.com/V5HLd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V5HLd.jpg" alt="enter image description here"></a></p>
  
  <p>and the figure supposed to look like this (in reverse)</p>
  
  <p><a href="https://i.stack.imgur.com/lTZcq.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lTZcq.jpg" alt="enter image description here"></a></p>
  
  <p>Any ideas how to correct it?</p>