Skip to content

Commit 973326d

Browse files
committed
yep
1 parent 89e839d commit 973326d

File tree

1 file changed

+1
-46
lines changed

1 file changed

+1
-46
lines changed

spikeinterface_gui/rateview.py

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ def _qt_make_layout(self):
3636
self.graphicsview = pg.GraphicsView()
3737
self.graphicsview.setCentralItem(self.plot)
3838
self.layout.addWidget(self.graphicsview)
39-
40-
4139

4240
def _qt_refresh(self):
4341
import pyqtgraph as pg
@@ -84,14 +82,6 @@ def _panel_make_layout(self):
8482
)
8583
self.segment_selector.param.watch(self._panel_change_segment, 'value')
8684

87-
88-
# empty_fig = bpl.figure(
89-
# sizing_mode="stretch_both",
90-
# background_fill_color=_bg_color,
91-
# border_fill_color=_bg_color,
92-
# outline_line_color="white",
93-
# )
94-
# self.empty_plot_pane = pn.pane.Bokeh(empty_fig, sizing_mode="stretch_both")
9585
self.rate_fig = bpl.figure(
9686
width=250,
9787
height=250,
@@ -107,15 +97,10 @@ def _panel_make_layout(self):
10797

10898
self.layout = pn.Column(
10999
pn.Row(self.segment_selector, sizing_mode="stretch_width"),
110-
#pn.Row(self.empty_plot_pane),
111-
# pn.Row(empty_fig, sizing_mode="stretch_both"),
112100
pn.Row(self.rate_fig,sizing_mode="stretch_both"),
113101
)
114102
self.is_warning_active = False
115103

116-
# self.plots = []
117-
# self.lines = []
118-
119104
def _panel_refresh(self):
120105
import panel as pn
121106
import bokeh.plotting as bpl
@@ -132,24 +117,7 @@ def _panel_refresh(self):
132117
bins_s = self.settings['bin_s']
133118
num_bins = total_frames[seg_index] // int(sampling_frequency) // bins_s
134119

135-
# Create Bokeh figure
136-
# p = bpl.figure(
137-
# width=250,
138-
# height=250,
139-
# tools="pan,wheel_zoom,reset",
140-
# active_drag="pan",
141-
# active_scroll="wheel_zoom",
142-
# background_fill_color=_bg_color,
143-
# border_fill_color=_bg_color,
144-
# outline_line_color="white",
145-
# )
146-
# p.toolbar.logo = None
147-
# p.grid.visible = False
148-
149-
# self.rate_fig.clear()
150-
# for l in self.lines:
151-
# l.remove()
152-
# self.lines = []
120+
# clear fig
153121
self.rate_fig.renderers = []
154122

155123
for unit_id in visible_unit_ids:
@@ -162,27 +130,14 @@ def _panel_refresh(self):
162130
# Get color from controller
163131
color = self.get_unit_color(unit_id)
164132

165-
# p.line(
166133
line = self.rate_fig.line(
167134
x=(bins[1:]+bins[:-1])/(2*sampling_frequency),
168135
y=count/bins_s,
169136
color=color,
170137
line_width=2,
171138
)
172-
# self.lines.append(line)
173139

174-
# p.y_range.start = 0
175140
self.rate_fig.y_range.start = 0
176-
# self.plots = [[p]]
177-
178-
# if len(self.plots) > 0:
179-
# grid = gridplot(self.plots, toolbar_location="right", sizing_mode="stretch_both")
180-
# self.layout[1] = pn.Row(
181-
# grid,
182-
# styles={'background-color': f'{_bg_color}'}
183-
# )
184-
# else:
185-
# self.layout[1] = self.empty_plot_pane
186141

187142
def _panel_change_segment(self, event):
188143
self.segment_index = int(self.segment_selector.value.split()[-1])

0 commit comments

Comments
 (0)