fixup: df.pivot needs parameter names

This commit is contained in:
Csaba Kiraly 2023-07-13 09:30:07 +00:00
parent b427cf93c0
commit 866229f8e8
No known key found for this signature in database
GPG Key ID: 0FE274EE8C95166E
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ class Visualizer:
ylabels = np.sort(np.unique(data[key][labels[1]]))
if len(xlabels) < self.minimumDataPoints or len(ylabels) < self.minimumDataPoints:
continue
df = pd.DataFrame.from_dict(data[key]).pivot(labels[0], labels[1], 'ttas')
df = pd.DataFrame.from_dict(data[key]).pivot(columns=labels[0], index=labels[1], values='ttas')
fig, ax = plt.subplots(figsize=(10, 6))
sns.heatmap(df, cmap='hot_r', cbar_kws={'label': 'Time to block availability (ms)'}, linecolor='black', linewidths=0.3, annot=True, fmt=".2f", ax=ax) #vmin=vmin, vmax=vmax
plt.xlabel(self.formatLabel(labels[0]))