Examples - plot_hists(), plot_boxes()

In [1]:
import numpy as np
from am4894pd.utils import df_dummy_ts # used to generate some dummy data
from am4894plots.plots import plot_hists, plot_boxes

# generate some dummy time series data
df = df_dummy_ts(n_cols=4, freq='1min')
df['dim1'] = np.random.choice(['A','B'],len(df))
print(df.shape)
display(df.head())
(1342, 5)
col0 col1 col2 col3 dim1
time
2019-01-01 01:39:00 -0.104941 -0.043834 -0.003645 0.158883 B
2019-01-01 01:40:00 -0.109494 -0.032217 0.015735 0.162104 A
2019-01-01 01:41:00 -0.090573 -0.029916 0.011437 0.168006 B
2019-01-01 01:42:00 -0.122065 -0.003902 0.032757 0.160433 A
2019-01-01 01:43:00 -0.107243 0.008204 0.033165 0.170859 B
In [2]:
plot_hists(df, n_cols=2, renderer='notebook', h=600, w=600, cumulative=True)