Skip to content

Commit

Permalink
Update 2D projection plot to show cathodes
Browse files Browse the repository at this point in the history
  • Loading branch information
marjoleinvannuland committed Jul 30, 2024
1 parent 79689d5 commit b3c2050
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions event_display/interactive_event_display/display_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,9 +1055,39 @@ def plot_2d_charge(data, evid):
showlegend=False,
)

cathode_line_1 = go.Scatter(
x=[-63.931/2, -63.931/2],
y=[-63.931, 63.931],
mode="lines",
line=dict(color="white", width=1),
)
cathode_line_2 = go.Scatter(
x=[63.931/2, 63.931/2],
y=[-63.931, 63.931],
mode="lines",
line=dict(color="white", width=1),
)

cathode_line_3 = go.Scatter(
x=[-63.931, 63.931],
y=[-63.931/2, -63.931/2],
mode="lines",
line=dict(color="white", width=1),
)
cathode_line_4 = go.Scatter(
x=[-63.931, 63.931],
y=[63.931/2, 63.931/2],
mode="lines",
line=dict(color="white", width=1),
)

# Add traces to the subplots
fig.add_trace(prompthits_traces_xy, row=2, col=2)
fig.add_trace(cathode_line_1, row=2, col=2)
fig.add_trace(cathode_line_2, row=2, col=2)
fig.add_trace(prompthits_traces_xz, row=1, col=1)
fig.add_trace(cathode_line_3, row=1, col=1)
fig.add_trace(cathode_line_4, row=1, col=1)
fig.add_trace(prompthits_traces_yz, row=2, col=1)
fig.add_trace(
dummy_trace, row=2, col=2
Expand All @@ -1079,7 +1109,7 @@ def plot_2d_charge(data, evid):
col=1,
showgrid=False,
range=[-60, 60],
zeroline=False,
zeroline=True,
scaleanchor="x1",
scaleratio=1,
)
Expand All @@ -1099,7 +1129,7 @@ def plot_2d_charge(data, evid):
col=1,
showgrid=False,
range=[-60, 60],
zeroline=True,
zeroline=False,
scaleanchor="x2",
scaleratio=1,
)
Expand Down

0 comments on commit b3c2050

Please sign in to comment.