Python Bokeh: Plotting same chart multiple times in gridplot -


i'm trying overview of plots of data of different dates. feeling of data plot relevant plots next each other. means want use same plot multiple times in gridplot command. noticed when use same chart multiple times show once in final .html file. first attempt @ solving use copy.deepcopy charts, gave following error:

runtimeerror: cannot property value 'label' lineglyph instance before hasprops.__init__ 

my approach has been follows:

from bokeh.charts import line, output_file, show, gridplot import pandas pd output_file('test.html') plots = []  df = pd.dataframe([[1,2], [3,1], [2,2]]) print(df) df.columns = ['x', 'y'] in range(10):     plots.append(line(df, x='x', y='y', title='forecast: ' + str(i),                  plot_width=250, plot_height=250))  plot_matrix = [] in range(len(plots)-1, 2, -1):     plot_matrix.append([plots[i-3], plots[i-2], plots[i]]) p = gridplot(plot_matrix) show(p) 

the results of html page grid plot lot of missing graphs. each graph shown once (instead of 3 times required), leads me think gridplot not me using same object multiple times. obvious solve create every graph 3 times different object, now, not inefficient, hurts eyes when looking @ code. i'm hoping has more elegant solution problem.

edit: made code runable


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -