title: How to smooth the curve?
body: <p>I am using the following code to draw a curve from my two column Raw data ( x=time , y=|float data|).The graph it is plotting is a rough edge graph. Is it possible to have a smooth edged on these data? I am attaching the code, data and curve.</p>
  <pre><code>from datetime import datetime
  import numpy as np
  import matplotlib.pyplot as plt
  import matplotlib.dates
  from matplotlib import style
  
  # changing matplotlib the default style
  matplotlib.style.use('ggplot')
  #one of {'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}
  plt.rcParams['lines.linewidth']=1
  plt.rcParams['axes.facecolor']='.3'
  plt.rcParams['xtick.color']='b'
  plt.rcParams['ytick.color']='r'
  
  
  
  x,y= np.loadtxt('MaxMin.txt', dtype=str, unpack=True)
  x = np.array([datetime.strptime(i, &quot;%H:%M:%S.%f&quot;) for i in x])
  y = y.astype(float)
  
  # naming the x axis 
  plt.xlabel('&lt;------Clock-Time(HH:MM:SS)------&gt;') 
  # naming the y axis 
  plt.ylabel('Acceleration (m/sq.sec)') 
  # giving a title to my graph 
  plt.title('Sample graph!')
  # plotting the points 
  plt.plot(x, y)
  # beautify the x-labels
  plt.gcf().autofmt_xdate()
  #Custom Format
  loc = matplotlib.dates.MicrosecondLocator(1000000)
  plt.gca().xaxis.set_major_locator(loc)
  plt.gca().xaxis.set_major_formatter(matplotlib.dates.DateFormatter('%H:%M:%S'))
  # function to show the plot 
  plt.show()
  </code></pre>
  <p>I have searched similar threads but the mathematical concepts used by them went over my head. So I cannot identify what exactly has to be done for my data.</p>
  <p><a href="https://i.stack.imgur.com/rmWj9.jpg" rel="nofollow noreferrer">Generated Graph from RAW data</a></p>
  <p>I am also giving the sample data file so that you can re-construct it at your end.</p>
  <p><a href="https://drive.google.com/file/d/1ADMgE_xjVHvt1DdnZNnt5Y-767DC-D6k/view?usp=sharing" rel="nofollow noreferrer">Get Data File</a></p>
  <p>PS. I am also not being able to change the line color in the graph from default red even after using</p>
  <pre><code>plt.rcParams['lines.color']='g'
  </code></pre>
  <p>Although that is a minor issue in this case.</p>