Skip to content

Commit 703aa74

Browse files
committed
used ms_plotly for chromatogram
1 parent 211d627 commit 703aa74

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/view.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,18 +195,19 @@ def view_peak_map():
195195
)
196196

197197
df_tic = df.groupby("RT").sum().reset_index()
198-
199-
tic_fig = go.Figure()
200-
tic_fig.add_trace(
201-
go.Scatter(
202-
x=df_tic["RT"],
203-
y=df_tic["inty"],
204-
mode="lines",
205-
line=dict(color="#f24c5c", width=2),
206-
name="TIC",
207-
)
198+
199+
tic_fig = df_tic.plot(
200+
kind="chromatogram",
201+
x="RT",
202+
y="inty",
203+
xlabel="Retention Time (s)",
204+
ylabel="TIC",
205+
grid=False,
206+
show_plot=False,
207+
backend="ms_plotly",
208208
)
209209

210+
210211
tic_fig.update_layout(
211212
height=200,
212213
margin=dict(l=0, r=0, t=0, b=0),

0 commit comments

Comments
 (0)