kebowen730 on add-vanilla-template
adding a vanilla html template … updating css fixing noqa declaration and 8 more (compare)
File "/home/XXXX/anaconda3/envs/plot2/lib/python3.7/site-packages/bokeh/embed/standalone.py", line 190, in components models = _check_models_or_docs(models) File "/home/XXXX/anaconda3/envs/plot2/lib/python3.7/site-packages/bokeh/embed/standalone.py", line 398, in _check_models_or_docs 'Input must be a Model, a Document, a Sequence of Models and Document, or a dictionary from string to Model and Document' ValueError: Input must be a Model, a Document, a Sequence of Models and Document, or a dictionary from string to Model and Document 127.0.0.1 - - [23/May/2020 17:38:05] "GET /plot/ HTTP/1.1" 500 -
Hi all, is there a way to use panel to change one part of
clim without using a RangeSlider? for instance, this works:
img = np.random.normal(size=(100,100)) hv_img = hv.Image(img) slider = pn.widgets.RangeSlider(start=-5, end=5, value=(-1, 1), name='contrast') hv_img = hv_img.apply.opts(clim=slider.param.value) pn.Row(slider, hv_img)
but I can't get something like this to work:
img = np.random.normal(size=(100,100)) hv_img = hv.Image(img) slider = pn.widgets.FloatSlider(start=0, end=5, value=1, name='contrast') hv_img = hv_img.apply.opts(clim=(-1, slider.param.value)) pn.Row(slider, hv_img)
ValueError: clim: tuple element is not numeric: <param.Number object at 0x7f425a624bb0>.
I will very thankful to you and appreciate your help.
script1, div1 = components(finalplot.get_root())
Here get_root() is use to get the parent document but do i need to use curdoc() to get the current plot in flask as my plot is dynamic with dropdown option .
# not working script1,div1=components(finalplot.curdoc())
which function i shoud call to get current document , so that when i change bokeh lot in embedded flask app then it should reflect in webpage also.
Thanks for quick reply @philippjfr
but its not working ,
can i do curdoc() by making standalone HTML files
from bokeh.io import curdoc doc=curdoc() # finalplot=finalplot.get_root(doc) # return Markup(file_html(finalplot.get_root(doc),CDN,"myplot")) if __name__=='__main__': app.run(debug=True)
it giving static plot , no zoom function , nothing.
2- by using component method no error is coming same time no plot is showing in webpage ,
i am using
from bokeh.resources import CDN
so there is no mismatch of bokeh cdn version but still no plot showing.
from bokeh.io import curdoc doc = curdoc() script, div = components(finalplot.get_root(doc)) cdn_js = CDN.js_files cdn_css=CDN.css_files return render_template("plot.html", script=script, div=div, cdn_css=cdn_css, cdn_js=cdn_js) #
My about page is showing , no error while plotting but plot is not showing in web page :(
sorry for lengthy .
I will really grateful if u guide me on this .
05_Composing_Plots.ipynbis raising a
ValueError: Index is not contained within new index. I've reported the issue here holoviz/holoviz#256. If some of you know a fix or workaround so that my course can get past this example it would be much appreciated. Thanks.
pn.Tabelements. By using
dynamic=True, I can get the panel object to display very quickly (under 2 seconds). Each tab has reasonable responsiveness too. However, construction of the panel object takes more than 30 seconds. That's a cumbersome startup time for each person that visits my panel app. Is it possible to serialize/deserialize the panel object to pickle for faster loading? Or is there an alterative way to pre-construct the object and only render it when someone uses the app?
Hi @jbogaardt . The right place to post usage questions is on Discourse. Then the answer is recorded and shared with the community. Please post it here https://discourse.holoviz.org/.
If possible please post a minimal example or a link to code that can be run. Potentially also include some screenshots or a .gif video. It is sometimes very difficult sitting on the other side and trying to guess what the problem can be and how to solve it.