Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 31 2018 21:50
    bryevdv synchronize #7839
  • May 31 2018 21:50

    bryevdv on 7795_range_tool

    add support for ignoring UI int… (compare)

  • May 31 2018 21:05
    bryevdv synchronize #7839
  • May 31 2018 21:05

    bryevdv on 7795_range_tool

    add support for ignoring UI int… (compare)

  • May 31 2018 17:32
    bryevdv milestoned #7795
  • May 31 2018 17:32
    bryevdv demilestoned #7795
  • May 31 2018 17:25
    bryevdv labeled #4922
  • May 31 2018 17:25
    bryevdv labeled #4922
  • May 31 2018 17:25
    bryevdv unlabeled #4922
  • May 31 2018 17:25
    bryevdv closed #4922
  • May 31 2018 17:25
    bryevdv commented #4922
  • May 31 2018 17:09
    bryevdv commented #6372
  • May 31 2018 17:05
    bryevdv milestoned #6372
  • May 31 2018 16:56
    bryevdv commented #7839
  • May 31 2018 16:50
    bryevdv synchronize #7839
  • May 31 2018 16:50

    bryevdv on 7795_range_tool

    use Enum for side cleanup support grab/resize cursors (compare)

  • May 31 2018 16:39
    bryevdv commented #7945
  • May 31 2018 16:39
    bryevdv labeled #7945
  • May 31 2018 16:39
    bryevdv labeled #7945
  • May 31 2018 16:39
    bryevdv closed #7945
ChesuCR
@chesucr
Hi!! I think the "additional dependency" pillow in the "Export Plots" section should be removed from there because it is already a bokeh dependency
Vishesh Mangla
@XtremeGood
hi how can I plot something like this x axis-->pts y axis--> pts but plotted pt is log x, log y
?
Bryan Van de Ven
@bryevdv
@chesucr agree that was overlooked, can you submit a PR?
@XtremeGood please prefer the discourse for support questions https://discourse.bokeh.org
Vishesh Mangla
@XtremeGood
ok ty
ChesuCR
@chesucr

Also, in the limitations section the sentence

Also, glyphs that are rendered via webgl won’t be included in the generated PNG, so it’s suggested to use the default Plot.webgl=True attribute.

seems outdated because the new notation is output_backend = 'webgl' and saving plots as PNG with output_backend = 'canvas' works well

Bryan Van de Ven
@bryevdv
@chesucr can you make and issue (or PR)?
ChesuCR
@chesucr
Done
Bryan Van de Ven
@bryevdv
Thanks @chesucr !
ChesuCR
@chesucr
Hello !! I am trying to export some plots in SVG. But something is not working. If I plot them with output_backend='svg' directly, all plots are not appearing. These errors appear. Do you have any idea of what's going on?
image.png
Sarah Bird
@birdsarah
What type of glyph @chesucr
ChesuCR
@chesucr
Mainly I use Scatter (circle and asterisk) and Multilines @birdsarah
I did some test with less code (minimal examples) and they worked well, I don't know where the problem is...
Sarah Bird
@birdsarah
If I were to guess I'd say it's the multiline
which may have NaNs in it
which appears to be what's upsetting the svg renderer
@bryevdv will have to remind me - do we insert NaNs into multiline data?
Or @chesucr does your data have NaN / Nones in it?
ChesuCR
@chesucr
Ah!! Actually I tried the circle with NaNs, I am going to make some test with the multiline glyphs right now
Yes that might might be the problem I am going to check
Bryan Van de Ven
@bryevdv
I believe there is also simply a bug with SVG output and circles
I would say that is a serious limitation on SVG output at present, but I don't know how to fix it
ChesuCR
@chesucr
OK, yess, thanks Bryan. Then I am going to replace all the scatter plots with circle plots, they seem to work ok
NaN with multiline work OK, I have just tested them @birdsarah
I tried something like this:
xs0 = np.random.random(size=N) * 10
xs0 = np.append(xs0, np.nan)

xs = [xs0, np.array([np.nan]), np.random.random(size=N) * 10, ]
ys = [np.random.random(size=N) * 10,  np.array([np.nan]), np.random.random(size=N) * 10, ]
ChesuCR
@chesucr
Well though the console is still complaining about some NaN values, if I export a bunch of plots, only the last one is exported well
image.png
Sarah Bird
@birdsarah
I'm sorry for your troubles @chesucr. I believe you're pushing on some edges that few have. I'd like to but I haven't had the time and have been using pngs for my publication plots.
ChesuCR
@chesucr
Don't worry @birdsarah , I will devote some time to look for another alternative solution. If not I am afraid I will have to get by with png files
Thanks for your interest
Alan Liddell
@aliddell

In a Jupyter notebook (bokeh==1.3.4, jupyter-client==5.3.1, Win 10, latest Firefox), I've noticed that updating the options list in a Select by appending and then calling push_notebook doesn't update the dropdown, while replacing options with a new list and calling push_notebook does. Is this by design?

import bokeh
import bokeh.io
import bokeh.models.widgets as widgets
bokeh.io.output_notebook()

(cell break)

s = widgets.Select(title="foo", options=[])
h = bokeh.io.show(s, notebook_handle=True)

(cell break)

s.options.append("bar")  # this doesn't work
bokeh.io.push_notebook()

(cell break)

s.options = ["bar"]  # this works
bokeh.io.push_notebook()

Hope this is the right place to ask this.

Bryan Van de Ven
@bryevdv
@aliddell not by design, per-se, just what is possible
the Bokeh Properties system can only detect when entire values change (i.e. are assigned to). When values are containers it cannot detect in-place changes to those containers
push_notebook only pushes detectable changes, so that is why the in-place change does not register
Bryan Van de Ven
@bryevdv
The only solution would be to send everything all the time, on every push_document call (e.g. potentially huge CDS objects), regardless of how tiny the actual change is. That's terribly inefficient, so we are not going to do that.
Alan Liddell
@aliddell
@bryevdv makes sense to me
d100hack
@d100hack
is there a clear example how to inject a javascript snippet into a Div, I'm assigning some html into a Div (which uses innerHTML I believe) but have some js that goes along with the html being assigned and it's not being picked up and executed , I put it into a template still no go any help much appreciated
Bryan Van de Ven
@bryevdv
@d100hack I've never attempted that, I am not sure if it is possible or not (don't recall seeing anyone else do it either)
d100hack
@d100hack
thanks @bryevdv , maybe I just add an external script to the template, I actually did that but for some reason it's not working properly, I'm sure I'm doing something wrong
Bryan Van de Ven
@bryevdv
well if you have a previously working code it would be good to compare across versions perhaps something about the layout refactor in 1.1 makes a difference
Memet Bilgin
@memetb

Hello all. I'm running into difficulty when trying to implement a basic customJSTransform. I've isolated code down to:

from bokeh.io import curdoc
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource
from bokeh.models.transforms import CustomJSTransform

edges = ColumnDataSource(data=dict(x=[0,2,50,124], y=[0,0,0,0]))

plot = figure(plot_height=800, plot_width=1200, tools=["xbox_zoom", "reset"])
offset = CustomJSTransform(func="""return x+10""")

plot.circle(x=dict(field='x',transform=offset), y='y', color="white", size=20, source=edges)
curdoc().add_root(plot)

This results in a Error rendering Bokeh items: TypeError: "e is undefined".

Is this a bug or am I doing something wrong? Thank you.

Bryan Van de Ven
@bryevdv
@memetb yes, you are applying the transform to an entire column of values so you need to provide the v_func (vectorized function) rather than func https://docs.bokeh.org/en/latest/docs/reference/models/transforms.html#bokeh.models.transforms.CustomJSTransform.v_func
for the future, please prefer the Discourse for support questions https://discourse.bokeh.org
Memet Bilgin
@memetb
Thanks @bryevdv! I will update my go to channel for bokeh support.
Bryan Van de Ven
@bryevdv
:thumbsup: