export_png Bokeh with all layers

Viewed 751

I try to make bokeh plot and export it in PNG. When i add legend layer it export empty image and i don't know why.

And when i exportinf png, i always watch this messege : "WARNING - The webdriver raised a TimeoutException while waiting for a 'bokeh:idle' event to signify that the layout has rendered. Something may have gone wrong."

on the first pic you can see coorrect export file, on the second - fail pic

Maybe i need to union my layers< but i don't know why

When i comment p.add_layout(new_legend, 'below') it export correctly, but legend located on my graph.

p.add_layout(new_legend, 'below')
p.tools.append(hover)

show(p)
export_png(p, filename=dir + "testoviy.png")
save(p)

I expect that the graph will be built and export correctly and the legend will be below the graph

expected

bad result

1 Answers

I found the solution. When i using xaxis range - i have to make height of my figure bigger. figure params

Or i can delete range of my yaxis range.

Related