How to plot a frequency plot use python
Here is the code:
import pandas as pd
from matplotlib import pyplot as plt
plt.rcParams["figure.figsize"] = [7.50, 3.50]
plt.rcParams["figure.autolayout"] = True
fig, ax = plt.subplots()
df = pd.DataFrame({'numbers': [2, 4, 1, 4, 3, 2, 1, 3, 2, 4]})
df['numbers'].value_counts().plot(ax=ax, kind='bar', xlabel='numbers', ylabel='frequency')
plt.show()
Ive a question about python plotting. How to make a frequency plot for example how to see some behaviours’ frequency ( coded as True or False) based on time of the dat (coded as AM or PM)
My ideal plot will be like this but indicates frequency of some behaviour that varies by time of the dat