Skip to content

Commit

Permalink
Use first column name as X-axis title
Browse files Browse the repository at this point in the history
  • Loading branch information
daipom committed Mar 19, 2023
1 parent df2f090 commit c311b0e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def plot(
data=data,
layout=go.Layout(
title=graph_title,
xaxis=dict(title="Elapsed [sec]" if use_elapsed else "X"),
xaxis=dict(title="Elapsed [sec]" if use_elapsed else dfs[0].columns[0]),
yaxis=dict(title=yaxis_title, exponentformat="SI"),
yaxis2=dict(
title=yaxis2_title
Expand Down Expand Up @@ -162,10 +162,10 @@ def main(
with_markers: bool,
minimum_required_value: int,
):
dfs = map(
lambda path: pd.read_csv(path, encoding=encoding, engine="python"),
file_path_list
)
dfs = [
pd.read_csv(path, encoding=encoding, engine="python")
for path in file_path_list
]
plot(
dfs,
file_path_list,
Expand Down

0 comments on commit c311b0e

Please sign in to comment.