Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaparmigiani committed Sep 24, 2024
2 parents b377052 + 701ab76 commit c2d675e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/panacus-visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ 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('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])))

n, m, non_cum_plots = get_subplot_dim(df)
Expand Down Expand Up @@ -261,9 +264,6 @@ def save_split_figures(ax, f, format, prefix):
if df_tc.index[0] == '0' and df_tc.loc['0'].isna().all():
df_tc.drop(['0'], inplace=True)
plot_growth(df_tc, axs_tc, loc=args.legend_location, estimate_growth=False)
else:
print(f'This script cannot visualize the content of type {t}, exiting.', file=stderr)
exit(1)

plt.tight_layout()
if not args.split_subfigures:
Expand Down

0 comments on commit c2d675e

Please sign in to comment.