Skip to content

Commit

Permalink
Fix issue of panacus-visualize rejecting ordered-histgrowth
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Heringer committed Oct 1, 2024
1 parent 0c9767e commit ec6dfca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions scripts/panacus-visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,11 @@ def save_split_figures(ax, f, format, prefix):
skip_n = count_comments(f)

df = clean_multicolumn_labels(pd.read_csv(args.stats, sep='\t', header=list(range(skip_n, skip_n + N_HEADERS)), index_col=[0]))
if df.columns[0][0] not in ['hist', 'growth', 'ordered-histgrowth']:
print("test", df.columns[0][0], file=stderr)
if df.columns[0][0] not in ['hist', 'growth', 'ordered-growth']:
print('This script cannot visualize the content of this type of table, exiting.', file=stderr)
exit(1)
df.columns = df.columns.map(lambda x: (x[0], x[1], x[2] and int(x[2]), x[3] and float(x[3])))
df.columns = df.columns.map(lambda x: (x[0], x[1], x[2] and int(x[2].replace("A", "")), x[3] and float(x[3].replace("R", ""))))

n, m, non_cum_plots = get_subplot_dim(df)
# setup fancy plot look
Expand Down
2 changes: 1 addition & 1 deletion src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ pub fn write_ordered_histgrowth_table<W: Write>(
.zip(hist_aux.coverage.iter())
.zip(&hist_aux.quorum)
.map(|(((p, t), c), q)| {
vec![p.to_string(), t.to_string(), c.to_string(), q.to_string()]
vec![p.to_string(), t.to_string(), c.get_string(), q.get_string()]
})
.collect::<Vec<Vec<String>>>(),
);
Expand Down

0 comments on commit ec6dfca

Please sign in to comment.