## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
• Create your own community
Kumaran
@kumaran-14
I reset my working tree and tried to run this test : py.test -m codebase and it still fails, due to the same error. How do I fix this?
Vicente
@masip85
I am looking certain type of info, and I find similar things, but not what I find precisely. And without a complete example I really don't find how to do it:
I have got a few time series plots. Well, too many data inside them. Here I need to make an app in order to create datashader. Ok,bokeh server is the easy part. Inside bokeh world I feel secure :) . But I have read that in order to connect this server with datashader, holoviz is needed. We've got new york examples, and another ones I have found in several places,but no one is a timeseries (with holoview) one. I am really confused when I try to implement it. Hard understanding without an example of that kind.
Any tip or key help web?
Andrew
@IAteAnDrew1_twitter

perhaps you can ask on the holoviz discourse https://discourse.holoviz.org/

also holoviz questions is more suitable on the pyviz channel https://gitter.im/pyviz/pyviz

Vicente
@masip85
@IAteAnDrew1_twitter , I haven't found anything, but I posted my question there
Andrew
@IAteAnDrew1_twitter

if it's a dataframe, you can probably do

import hvplot.pandas
df.hvplot(x, y, datashade=True).servable()

then in command line
bokeh serve main.py or panel serve main.py

Vicente
@masip85
ok.I'll test
Amit Sandhel
@amitsandhel
hi quick question
so for bokeh 1.4 for area charts or if i use plot.patch is the hover feature applicable to it
or not implemented still i see a outstanding git ticket for it but confused ?
Bryan Van de Ven
@bryevdv
hover on patch is still an open issue
Amit Sandhel
@amitsandhel
is there a workaround for it by any chance or another type of graph I can use in place of patch. i'm building an area chart ?
ChesuCR
@chesucr
Hi !! Another quick question, is there a way to check if an event was triggered programmatically or manually through the interface? A dropdown "on_change" event for instance.
Bryan Van de Ven
@bryevdv
There is not any distinction, the widgets just set the values programmatically internally, exactly the same way a callback would
ChesuCR
@chesucr
Okay thank you, I will try to do it in a different way then
orkun
@orkun

Hi,
How can I hide bounding rectangle?
here is the related code:
'''source = ColumnDataSource(
data=dict(image = [dep[::-1,:]] ,bounds = [bounds_dep] ))

cmapper = LinearColorMapper(Inferno256, low=0.01, high=0.80)
p.image(image='image', x=minX_dep, y=minY_dep, dw=(maxX_dep-minX_dep ), dh=( maxY_dep -minY_dep) , global_alpha=0.5 , source=source, color_mapper=cmapper)'''

This shows the bounding rectangle as gray color. How can I hide it?
regards

Bryan Van de Ven
@bryevdv
@orkun please pose support / usage questions on the Project Discourse: https://discourse.bokeh.org/ Also as a helpful suggestion, it's always advised to include an image/screenshot for a question like this. I have no idea what grey rectangle you might be referring to here, for instance
Bryan Van de Ven
@bryevdv
@Pytonik1_twitter please do not post spam links to off-topic things here. If you persist, I will block you from this channel.
Bernardo Lourenço
@bernardomig
Hi everybody. I have a question: I am creating a plot to show a grid of images (8x4). I created it as shown bellow:
x = torch.rand((32, 28, 28))
x = (x > 0.5).float()

ps = []
for i in range(len(x)):
p = figure()
p.axis.visible = False
p.image(image=[x[i].numpy()], x=[0], y=[0], dw=[28], dh=[28])
ps.append(p)
p = gridplot(children=ps, ncols=8, sizing_mode='scale_both')
show(p)

I want to add a title to the overall plot, but I do not find a way to do it easily. Could you help me?

The old code from mpl is as:

fig, ax = plt.subplots(4, 8, figsize=(16, 8))
ax = ax.flatten()
for i in range(4 * 8):
ax[i].set_axis_off()
ax[i].imshow(x[i])
fig.suptitle('Random samples from $28 \\times 28$ images.', size=20)
fig.tight_layout()
fig.subplots_adjust(top=0.92)
Bryan Van de Ven
@bryevdv
@bernardomig please use the Project Discourse for support questions https://discourse.bokeh.org/c/community-support
Bryan Van de Ven
@bryevdv
Julia Signell
@jsignell
Is there a tweet that I can retweet?
Bryan Van de Ven
@bryevdv
Andrejus
@AndrejusAnto
@bryevdv Hi, any ideas why even simple examples don't work (no graphs) with bokeh 2.0, tested linux with python 3.7 and 3.8?
Bryan Van de Ven
@bryevdv
@AndrejusAnto all of the (several hundred) examples in the docs and gallery work, so it's not possible to say anything without more information. 2.0 was a major release, including breaking changes so there may be adjustments to make on your end. Please come by the discourse if you want to discuss details
Andrejus
@AndrejusAnto
@bryevdv so i was testing conda envs and it seams there is problem with bokeh 2 and brave browser (?), via web tools getting errors
Bryan Van de Ven
@bryevdv
@AndrejusAnto you will need to force-reload / clear cache bokeh/bokeh#9773
gallery will be republished soon with the the crossorigin attributes everywhere
Andrejus
@AndrejusAnto
@bryevdv ok, works in private mode.
Bryan Van de Ven
@bryevdv
@AndrejusAnto it should work if you clear cache/force reload and view any output that has the SRI hashes present first
Anyway I will try to re-publish the gallery this week so that people don't run in to this by perusing the docs site first
Bryan Van de Ven
@bryevdv
The issue is that Chrome and Brave have a bizarre interpretation of SOP re: cached files. If you first load a page that loads BokehJS from CDN without a crossorigin="anonymous"specified (e.g. the gallery, perhaps other places), then if you try to load the same script again with crossorigin specificied, the regard the new (stricter) accept headers received as being incompatible with the (older, more permissive) headers, even though the content satisfies the stricter crossorigin policy. This is a dumb thing to do and many people have rightly called it out as a bug on the Chrome tracker.
epifanio
@epifanio

Hi, while rebuilding a machine which uses both bokeh and holoviews I encountered this problem:

 from bokeh.plotting.helpers import _known_tools as known_tools
ModuleNotFoundError: No module named 'bokeh.plotting.helpers'

which is also listed here: holoviz/hvplot#424
and is related to api changes in the new bokeh release.

Do you know if the helpers submodule has been moved or replaced in bokeh>+2.x?

I see , helpers.py has been removed with https://github.com/bokeh/bokeh/commit/6f4115344e81fafbd7d3836b62ce31f5ef9b6782#diff-e42bf369acbbcbcedf2ed24df6022bd1 now I was wondering where to find the known_tools methods (or its replacment)
epifanio
@epifanio
This may work: from bokeh.plotting._tools import TOOLS_MAP as known_tools i'll try
It seems to work and points me to the next api change involved in the new release:
>>> import hvplot.pandas
...
from bokeh.embed.notebook import encode_utf8, notebook_content
ImportError: cannot import name 'encode_utf8' from 'bokeh.embed.notebook' (/usr/local/lib/python3.7/site-packages/bokeh/embed/notebook.py)
Bryan Van de Ven
@bryevdv
Bokeh 2.0 is python 3 only so encode_utf8 was not needed for any purpose in the codebase
For tools this will be in 2.0.1 bokeh/bokeh#9786 which may be useful
epifanio
@epifanio
@bryevdv that makes perfectly sense, thanks!
epifanio
@epifanio

Still dealing with an upgrade to bokeh 2.0 I am now facing this error:

metsis_fastapi |     raise TypeError(f'Object of type {o.__class__.__name__} '
metsis_fastapi | TypeError: Object of type DatetimeGregorian is not JSON serializable

for a code that was used to work , this the complete error and part of the code to reproduce the issue https://gist.github.com/epifanio/cc5265614831b4e363585d65b9d5a540

i tried to downgrade bacj to 1.4.0 but the error persist
Andrejus
@AndrejusAnto
@bryevdv how to change javascript code for functickformatter? I don't know Javascript ;).
FuncTickFormatter(code="""
data = {"-3.5": "Didelis", "-2.5": "Vidutinis", "-1.5": 'Mažas', "-0.5": "Norma", 0.5: 'Norma', 1.5: 'Mažas', 2.5: 'Vidutinis', 3.5: 'Didelis'}
return data[tick]
""")
Bryan Van de Ven
@bryevdv
@epifanio @AndrejusAnto Please take support questions to the Discourse: https://discourse.bokeh.org/
epifanio
@epifanio
@bryevdv , I will use discourse thanks for the reminder :)
kmallick2000
@kmallick2000
I have a few bokeh apps being served up with flask. I would like to add a button widget in my bokeh app to reset the session and/or reset to the starting variables after the user has interacted with the widgets. How do I do that?
Bryan Van de Ven
@bryevdv
@kmallick2000 please take support questions to the Project Discourse https://discourse.bokeh.org/
davidpasquale
@davidpasquale
Hi, is it possible to render different pages with the same server? I mean multiple figure/widgets (noproblem if they have different URL) sharing the same data on server side.
Bryan Van de Ven
@bryevdv
@davidpasquale please take support questions to the Project Discourse https://discourse.bokeh.org/