Skip to content

Commit

Permalink
Update draw_peak for newer libgunshotmatch-mpl
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed May 8, 2024
1 parent e8c70ff commit 478befd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions peakviewer/peak_canvas_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def refresh(self) -> None:

self.canvas.draw()

def draw_peak(self, project: Project, peak_idx: int) -> None:
def draw_peak(self, project: Project, retention_times: List[float]) -> None:
"""
Draw a set of aligned peaks.
Expand All @@ -329,7 +329,7 @@ def draw_peak(self, project: Project, peak_idx: int) -> None:
for ax in self.axes:
ax.clear()

draw_peaks(project, peak_idx, self.figure, self.axes)
draw_peaks(project, retention_times, self.figure, self.axes)

self.refresh()

Expand Down
2 changes: 1 addition & 1 deletion peakviewer/peak_viewer_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def draw_peak(self) -> None:

self.toolbar_name_panel.SetLabelText('\n'.join(textwrap.wrap(peak.hits[0].name, width=40)))

self.panel.draw_peak(self.project, peak.meta["peak_number"])
self.panel.draw_peak(self.project, peak.rt_list)

def load_project(self, filename: PathLike) -> None:
"""
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ click>=8.1.6
consolekit>=1.5.1
domdf-python-tools>=3.6.1
libgunshotmatch>=0.1.0
libgunshotmatch-mpl@ git+https://github.com/GunShotMatch/libgunshotmatch-mpl
libgunshotmatch-mpl>=0.6.0b1
matplotlib>=3.7.2
wxpython>=4.0.7; platform_system == "Windows"
wxpython>=4.0.7; platform_system == "Darwin"

0 comments on commit 478befd

Please sign in to comment.