4

enter image description here

df3['a'].plot.hist(color='blue',xlim=(0,1))

I want to know how can it show the line in the histogram figure. Make the top figure showed as bottom figure. Thank you!

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
a81884855
  • 93
  • 1
  • 3
  • 7

1 Answers1

5

Pass the edgecolor argument to hist.

df3['a'].plot.hist(color='blue',
                   edgecolor='black',
                   xlim=(0,1))

Demo

df = pd.DataFrame(dict(vals=np.random.normal(size=100)))

df.plot.hist(edgecolor='black')

demo

miradulo
  • 28,857
  • 6
  • 80
  • 93