title: How can I increase range of x-axis in probability density plot even If I have no data for that?
body: <p>Actually I am trying to plot density plot in python. I want range for -1 to 1 however I know I don't have values in my data set beyond -0.6 and 0.6. But is there any way where I can plot just zero for all the values beyond -0.6 an 0.6. In short I want to increase range of my plot to make it consistent.</p>
  
  <p><a href="https://i.stack.imgur.com/LkNs1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LkNs1.png" alt="enter image description here"></a></p>
  
  <p>So far I am using this code:</p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  #import seaborn as sns
  
  data_Pre1 = pd.read_csv("new errors.csv")
  
  
  for s in data_Pre1.columns:
      data_Pre1[s].plot(kind='density', sharey = True)
  #plt.title("Disk Galaxies", fontsize = 18)
  plt.xlabel("$E_i$", fontsize = 40)
  plt.ylabel('Density', fontsize = 40)
  plt.xlim(-1,1)
  plt.legend(fontsize =25)
  plt.xticks(size = 15)
  plt.yticks(size = 15)
  plt.show()
  </code></pre>