Skip to content

Commit

Permalink
Improve the ticks markign the spikes in the plotting of the recordings (
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTaDa authored Jan 17, 2023
1 parent 9f6c276 commit 85a7efd
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 125 deletions.
2 changes: 1 addition & 1 deletion bluepyefe/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def plot_recordings(self, protocol_name, output_dir=None, show=False):

fig, axs = plt.subplots(
n_rows, n_cols,
figsize=[3.0 + 1.9 * int(n_cols), 2.4 * n_rows],
figsize=[3.0 + 2.2 * int(n_cols), 2.5 * n_rows],
squeeze=False
)

Expand Down
8 changes: 4 additions & 4 deletions bluepyefe/recording.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,15 +359,15 @@ def plot(
axis_current.set_title(title, size="x-small")

gen_t, gen_i = self.generate()
axis_current.plot(self.t, self.current, c="C0")
axis_current.plot(gen_t, gen_i, c="C1", ls="--")
axis_voltage.plot(self.t, self.voltage, c="C0")
axis_current.plot(self.t, self.current, c="C0", lw=0.8)
axis_current.plot(gen_t, gen_i, c="C1", ls="--", lw=0.8)
axis_voltage.plot(self.t, self.voltage, c="C0", lw=0.8)

if self.peak_time is not None:
max_v = numpy.max(self.voltage)
for pt in self.peak_time:
axis_voltage.plot(
[pt, pt], [max_v - 30., max_v + 10.], c="C3", ls="--", lw=0.7
[pt, pt], [max_v + 5, max_v + 15], c="C3", ls="-", lw=0.5
)

if display_xlabel:
Expand Down
258 changes: 138 additions & 120 deletions examples/example_of_extraction.ipynb

Large diffs are not rendered by default.

0 comments on commit 85a7efd

Please sign in to comment.