question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Color scatter example in Gallery shows nothing in browser

See original GitHub issue

ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)

  • Python: Python 3.6.4 :: Anaconda custom (64-bit)
  • bokeh: 0.12.14
  • OS: Windows 10
  • Chrome: 64.0.3282.186

Description of expected behavior and the observed behavior

I run the Color scatter example in Gallery and the html file is generated. But It shows nothing in my chrome.

Complete, minimal, self-contained example code that reproduces the issue

The code is same as the example.

import numpy as np

from bokeh.plotting import figure, show, output_file

N = 4000
x = np.random.random(size=N) * 100
y = np.random.random(size=N) * 100
radii = np.random.random(size=N) * 1.5
colors = [
    "#%02x%02x%02x" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)
]

TOOLS="hover,crosshair,pan,wheel_zoom,zoom_in,zoom_out,box_zoom,undo,redo,reset,tap,save,box_select,poly_select,lasso_select,"

p = figure(tools=TOOLS)

p.scatter(x, y, radius=radii,
          fill_color=colors, fill_alpha=0.6,
          line_color=None)

output_file("color_scatter.html", title="color_scatter.py example")

show(p)  # open a browser

Stack traceback and/or browser JavaScript console output

Chrome console output:

Uncaught Error: Model 'Slider' does not exist. This could be due to a widget
                     or a custom model not being registered before first usage.
    at Object.i.Models (bokeh-0.12.14.min.js:1)
    at Function.t._instantiate_object (bokeh-0.12.14.min.js:1)
    at Function.t._instantiate_references_json (bokeh-0.12.14.min.js:1)
    at Function.t.from_json (bokeh-0.12.14.min.js:1)
    at bokeh-0.12.14.min.js:1
    at bokeh-0.12.14.min.js:1

Screenshots or screencasts of the bug in action

It shows nothing.

Here is the generated html file.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bryevdvcommented, Mar 16, 2018

The long and the short of it is, you have output that seems to combine data and models from at least three different examples. Have never seen anything like this ever, if you are running scripts in separate processes, so it will be necessary to know more exactly what steps you have followed. If you are running the code one after the other in a single python process, that is important information, you’ll probably need to call reset_output between each.

0reactions
secsilmcommented, Mar 16, 2018

@bryevdv Thank you for your detailed explanation. I reruned the code in my computer and it finally worked! I guess the reason is that I runed several exzample code one by one in a single python process and didn’t call reset_output between each(didn’t konw that function before) yesterday. Thank you again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

why color maps become blank or invisible, and how to fix it
when this happens, any color map i try to plot from now on, either by scatter plot or image (etc...), becomes blanc. recently...
Read more >
Plotly chart not showing in Jupyter notebook - Stack Overflow
I tried all of the above things but still got blank graph. ... Changing default web browser to Chrome solved the issue in...
Read more >
Visualization: Scatter Chart - Google Developers
Overview. Scatter charts plot points on a graph. When the user hovers over the points, tooltips are displayed with more information. Google scatter...
Read more >
Resolved: Matplotlib figures not showing up or displaying
I coded up a quick Python script using matplotlib, executed the script, only to not have the figure displayed to my screen. My...
Read more >
Scatterplot chart options | Looker - Google Cloud
This page describes the options for editing scatterplot charts in the visualization menu. Select the Edit option in the upper right corner of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found