0

Horizon Plot I want to show in bokeh interface

Hello! I can build Horizon Plots and save them as figures. I want to plot these figures with my bokeh interface, so I can choose different entries. I'm using bokeh movies example as starting point, so the structure is similiar.

The problem is that my image is built on main.py, with the entries chosen, and I want to update it on my interface.

How can I show this figure with curdoc? Or with the rest of my interface? (It doesn't let me to do "show")

Also I couldn't get bkcharts Horizon to work too.

  • you need to post your relevant codes and have your question around what kind of issue you are facing? In current format of your question, you are asking for recommendations or solution which might be different based on different invidual's perspective... – Aditya Mar 08 '18 at 10:52
  • Hi Aditya, I found a way to go around this issue. Currently I am saving my image in some paste and I want to give that directory as an url to my plot. So my current problem is how to access to my directory. I'm following these steps: https://stackoverflow.com/questions/34646270/how-do-i-work-with-images-in-bokeh-python – Mariana Abreu Mar 08 '18 at 11:34

1 Answers1

0

Solved!

I was able to see my horizon Plot in bokeh by saving my image:

h_plot.savefig('../static/new_horizon_plot.png', bbox_inches='tight')

And open it:

img_path = 'horiz_interface/static/new_horizon_plot.png'
signal_plot = figure(x_range=x_range, y_range=y_range)
signal_plot.image_url(url=[img_path], x=1, y=1, w=500, h=409, anchor="bottom_left")