Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nstat/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1946,10 +1946,10 @@ def plotExponentialFit(self, minTime: float | None = None, maxTime: float | None
fig.tight_layout()
return fig

def plot(self, dHeight: float = 1.0, yOffset: float = 0.5, currentHandle=None):
def plot(self, dHeight: float = 1.0, yOffset: float = 0.5, currentHandle=None, handle=None):
import matplotlib.pyplot as plt

ax = plt.gca() if currentHandle is None else currentHandle
ax = plt.gca() if (currentHandle is None and handle is None) else (currentHandle or handle)
lines = []
for spike_time in self.spikeTimes:
(line,) = ax.plot(
Expand All @@ -1958,7 +1958,7 @@ def plot(self, dHeight: float = 1.0, yOffset: float = 0.5, currentHandle=None):
"k",
)
lines.append(line)
if currentHandle is None:
if currentHandle is None and handle is None:
xunits = f" [{self.xunits}]" if self.xunits else ""
yunits = f" [{self.yunits}]" if self.yunits else ""
ax.set_xlabel(f"{self.xlabelval}{xunits}")
Expand Down