fontmap = {1: 10, 2: 8, 3: 6, 4: 5, 5: 4}
if vars is None:
vars = traces[0].varnames
// Extract sample data
samples = [{v: trace[v] for v in vars} for trace in traces]
chains = len(traces)
n = len(samples[0])
f, ax = plt.subplots(n, chains, squeeze=False)
max_lag = min(len(samples[0][vars[0]])-1, max_lag)
After Change
if vars is None:
vars = trace.varnames
else:
vars = [str(var) for var in vars]
chains = trace.nchains
f, ax = plt.subplots(len(vars), chains, squeeze=False)