Skip to main content

Create histogram from df

df sample:

 trace idno of unique person
0TRACE_PERSON_000000000316
1TRACE_PERSON_000000000520
2TRACE_PERSON_00000000115
.........
313TRACE_PERSON_000000099520
314TRACE_PERSON_00000009986
315TRACE_PERSON_00000009998

Code:

import matplotlib.pyplot as plt

fig = plt.figure(figsize=(10,10)) 
axes1 = fig.add_subplot(1,1,1)
axes1.hist(df_trace_person_count['no of unique person'],bins=72, color='black')
axes1.set_xlabel('Count of people')
axes1.set_ylabel('Count of clusters')

Result:

image.png