Hello,
I am writing a code that creates multiple plots depending on the number of input files. Each plot object is stored as a dictionary value with a uniqe key identifier which enables me to differentiate plots. I have a problem when creating plots by calling show() in combination with column() function in order to display multiple plots in a vertical alignment. When I create a string of desired objects that I want to plot and provide it to the column() within show() function I get the following error:“LayoutDOM items can be inserted into a column”. I am wondering if**there is any other way to provide objects to be plotted rather than entering them manually?
I is working when i enter values manually:
show(column(my_dict[‘one’], my_dict[‘two’]))
When I try:
some_string=“my_dict[‘one’], my_dict[‘two’]”
show(column(some_string))
ValueError: Only LayoutDOM items can be inserted into a column.
Cheers,
Nemanja
Hi Nemanja,
It’s not the matter of Bokeh, but rather of Python.
What you want can be done simply by: show(column(*[my_dict[n] for n in selected_plot_names]))
Regards,
Eugene
···
On Thursday, October 12, 2017 at 10:32:37 PM UTC+7, [email protected] wrote:
Hello,
I am writing a code that creates multiple plots depending on the number of input files. Each plot object is stored as a dictionary value with a uniqe key identifier which enables me to differentiate plots. I have a problem when creating plots by calling show() in combination with column() function in order to display multiple plots in a vertical alignment. When I create a string of desired objects that I want to plot and provide it to the column() within show() function I get the following error:“LayoutDOM items can be inserted into a column”. I am wondering if**there is any other way to provide objects to be plotted rather than entering them manually?
I is working when i enter values manually:
show(column(my_dict[‘one’], my_dict[‘two’]))
When I try:
some_string=“my_dict[‘one’], my_dict[‘two’]”
show(column(some_string))
ValueError: Only LayoutDOM items can be inserted into a column.
Cheers,
Nemanja
By the way, “column” accepts also a list of objects, so you can even omit “*” in my previous message.
Eugene
···
On Friday, October 13, 2017 at 1:44:46 AM UTC+7, Eugene Pakhomov wrote:
Hi Nemanja,
It’s not the matter of Bokeh, but rather of Python.
What you want can be done simply by: show(column(*[my_dict[n] for n in selected_plot_names]))
Regards,
Eugene
On Thursday, October 12, 2017 at 10:32:37 PM UTC+7, [email protected] wrote:
Hello,
I am writing a code that creates multiple plots depending on the number of input files. Each plot object is stored as a dictionary value with a uniqe key identifier which enables me to differentiate plots. I have a problem when creating plots by calling show() in combination with column() function in order to display multiple plots in a vertical alignment. When I create a string of desired objects that I want to plot and provide it to the column() within show() function I get the following error:“LayoutDOM items can be inserted into a column”. I am wondering if**there is any other way to provide objects to be plotted rather than entering them manually?
I is working when i enter values manually:
show(column(my_dict[‘one’], my_dict[‘two’]))
When I try:
some_string=“my_dict[‘one’], my_dict[‘two’]”
show(column(some_string))
ValueError: Only LayoutDOM items can be inserted into a column.
Cheers,
Nemanja