Plots getting rid of whitespace So I'm doing the Udemy course for Data Science in Python, and there's something weird happening with the plots. The first one in the above picture is mine, the second is the instructors. 

How do I get rid of the white space on the sides, they seem to be default when using the plotting function in pandas.

Edit: 
This is all the code. Everything is basically default, so I'm guessing the matplotlib has some default settings changed in newer version of the package. The file df3 is here https://github.com/sxsheng/Udemy 

Code:

import pandas as pd

import matplotlib.pyplot as plt

df3 = pd.read_csv('df3')

%matplotlib inline (This line is to be used in jupyter notebooks to display plots)

df3['a'].plot.hist()
Welcome to the site!

what you where thinking is right, the new version plot looks a bit different, to get exactly the same plot as above you can use the following code:

import pandas as pd
import matplotlib.pyplot as plt    
df3 = pd.read_csv('df3')
#%matplotlib inline (This line is to be used in jupyter notebooks to display plots)

ax = plt.subplot(111)
ax.hist(df3['a'],ec='black')

#this is x axis limiter since your value ranges in between 0 to 1 I gave these values
plt.xlim([0,1])
plt.show()


Outcome:



Let me know if you need anything else. 

If this is what you were looking for, then you can accept the answer by clicking on the green tick mark.