Skip to content

Commit 9b22560

Browse files
committed
fix pypop logo plotting in bokeh
1 parent ce2ee8d commit 9b22560

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pypop/notebook_interface/plotting.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def _repr_png_(self):
109109
self.figure.toolbar_location = None
110110

111111
driver.set_window_size(*window_size)
112-
112+
113113
try:
114114
img = get_screenshot_as_png(self.figure, driver=driver, timeout=10)
115115
except:
@@ -423,7 +423,11 @@ def _build_plot(self):
423423
render_h = self._logo_height
424424
render_w = self._logo_height * img_w / img_h
425425
self._figure.image_rgba(
426-
image=[pop_data], x=20, y=-self._logo_height, dw=render_w, dh=render_h
426+
image=[pop_data.view(dtype=numpy.uint32).reshape((img_h, img_w))],
427+
x=20,
428+
y=-self._logo_height,
429+
dw=render_w,
430+
dh=render_h,
427431
)
428432

429433
self.update()

0 commit comments

Comments
 (0)