# Not showing output on Jupyter notebook when using PyCall.jl + python's bokeh combination

**URL:** https://discourse.julialang.org/t/not-showing-output-on-jupyter-notebook-when-using-pycall-jl-pythons-bokeh-combination/95121
**Category:** Visualization
**Created:** [February 24, 2023, 10:42am UTC](https://discourse.julialang.org/t/not-showing-output-on-jupyter-notebook-when-using-pycall-jl-pythons-bokeh-combination/95121 "2023-02-24T10:42:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![YH\_Ko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yh_ko/32/45438_2.png) [@YH\_Ko](https://discourse.julialang.org/u/YH_Ko)
#### Post date: [February 24, 2023, 10:42am UTC](https://discourse.julialang.org/t/not-showing-output-on-jupyter-notebook-when-using-pycall-jl-pythons-bokeh-combination/95121/1 "2023-02-24T10:42:17Z")

</div>

When using Bokeh.jl, the output interactive plot is shown in out cell of Jupyter notebook with no error.  
(I tried the following Bokeh.jl example)  
[https://cjdoris.github.io/Bokeh.jl/stable/gallery/Basic/les\_mis/#demo\_les\_mis](https://cjdoris.github.io/Bokeh.jl/stable/gallery/Basic/les_mis/#demo_les_mis)

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/6/c67b284eb2427d70837f6a2922ef52479a06be1c.png)

However, it doesn’k work well when using PyCall.jl and py"“” ~ “”" combination  
[https://docs.bokeh.org/en/latest/docs/gallery/les\_mis.html](https://docs.bokeh.org/en/latest/docs/gallery/les_mis.html)

```julia
using PyCall

py"""

import numpy as np

from bokeh.plotting import figure, show
from bokeh.sampledata.les_mis import data

nodes = data['nodes']
names = [node['name'] for node in sorted(data['nodes'], key=lambda x: x['group'])]

N = len(nodes)
counts = np.zeros((N, N))
for link in data['links']:
    counts[link['source'], link['target']] = link['value']
    counts[link['target'], link['source']] = link['value']

colormap = ["#444444", "#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99",
            "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a"]

xname = []
yname = []
color = []
alpha = []
for i, node1 in enumerate(nodes):
    for j, node2 in enumerate(nodes):
        xname.append(node1['name'])
        yname.append(node2['name'])

        alpha.append(min(counts[i,j]/4.0, 0.9) + 0.1)

        if node1['group'] == node2['group']:
            color.append(colormap[node1['group']])
        else:
            color.append('lightgrey')

data=dict(
    xname=xname,
    yname=yname,
    colors=color,
    alphas=alpha,
    count=counts.flatten(),
)

p = figure(title="Les Mis Occurrences",
           x_axis_location="above", tools="hover,save",
           x_range=list(reversed(names)), y_range=names,
           tooltips = [('names', '@yname, @xname'), ('count', '@count')])

p.width = 800
p.height = 800
p.grid.grid_line_color = None
p.axis.axis_line_color = None
p.axis.major_tick_line_color = None
p.axis.major_label_text_font_size = "7px"
p.axis.major_label_standoff = 0
p.xaxis.major_label_orientation = np.pi/3

p.rect('xname', 'yname', 0.9, 0.9, source=data,
       color='colors', alpha='alphas', line_color=None,
       hover_line_color='black', hover_color='colors')

show(p)

"""

```

Any solutions to this problem??
