Skip to content

Commit 94a8b17

Browse files
authored
Merge pull request #75 from AllenNeuralDynamics/fix_ylabel
Fixing ylabel for FIP plots
2 parents a25534b + 906e22f commit 94a8b17

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

  • src/aind_dynamic_foraging_basic_analysis/plot

src/aind_dynamic_foraging_basic_analysis/plot/plot_fip.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,14 @@ def plot_fip_psth_compare_alignments( # NOQA C901
141141

142142
plt.legend()
143143
ax.set_xlabel(align_label, fontsize=STYLE["axis_fontsize"])
144-
ax.set_ylabel("df/f", fontsize=STYLE["axis_fontsize"])
144+
if data_column == "data":
145+
ylabel = "df/f"
146+
elif data_column == "data_z":
147+
ylabel = "z-scored df/f"
148+
else:
149+
# Default to df/f
150+
ylabel = "df/f"
151+
ax.set_ylabel(ylabel, fontsize=STYLE["axis_fontsize"])
145152
ax.spines["top"].set_visible(False)
146153
ax.spines["right"].set_visible(False)
147154
ax.set_xlim(tw)
@@ -266,7 +273,13 @@ def plot_fip_psth_compare_channels( # NOQA C901
266273

267274
plt.legend()
268275
ax.set_xlabel(align_label, fontsize=STYLE["axis_fontsize"])
269-
ax.set_ylabel("df/f", fontsize=STYLE["axis_fontsize"])
276+
if data_column == "data":
277+
ylabel = "df/f"
278+
elif data_column == "data_z":
279+
ylabel = "z-scored df/f"
280+
else:
281+
ylabel = "df/f"
282+
ax.set_ylabel(ylabel, fontsize=STYLE["axis_fontsize"])
270283
ax.spines["top"].set_visible(False)
271284
ax.spines["right"].set_visible(False)
272285
ax.set_xlim(tw)

0 commit comments

Comments
 (0)