How do I set an image on a timeseries plot?

I create a timeseries, with source:

source_ts = ColumnDataSource(data=dict(
date=,
y=,
url=[url]
))

ts = figure(plot_height=250, plot_width=500, x_axis_type=‘datetime’, tools=TOOLS_ts)

I add a line:

ts_line1 = ts.line(x=‘date’,
y=‘y’,
source=source_ts,
color=color2,
line_width=3,
)

Then I try to add an image like this:

ts.image_url(url=‘url’,x=0.5,y=0.5,h=.04,w=.20, source=source_ts)

This works perfectly fine when I do not have a timeseries, but now the image does not show up. I imagine it has something to do with setting the y value, so I tried insterting the unix timestamp, but that doesn’t work.

What do I put in here for values? Also, the y axis is decimal values converted to percentages, could that also cause problems when I set it at 0.5 (indicating 50%)?

thanks

I create a timeseries, with source:

source_ts = ColumnDataSource(data=dict(
date=,
y=,
url=[url]
))

I can't tell it this is meant literally or meant to be illustrative. But I will assume the former and state that one immediate problem is that your CDS columns are not all the same length.

  ** ALL columns in a given ColumnDataSource MUST be the SAME length, ALWAYS **

In future versions of Bokeh, violating this assumption will be hard error (exception). Think of a CDS as "cheap" Pandas Dataframe, i.e. a table with equal-length columns.

Regarding the rest, it's hard to say with just snippets. Can you provide a complete, minimal, runnable as-is example script that reproduces your issue?

Often times, with complete code that can actually be be run and tested, I (or others) can figure out almost immediately what the problem is. It's much less obvious with just snippets. The amount of traffic on the mailing list means it is absolutely not humanly possible for me to try to build up complete to turn snippets into runnable scripts. A complete runnable example the the number 1 best thing to help others help you.

Thanks,

Bryan

···

On Jan 12, 2017, at 10:49 AM, vierentwintig <[email protected]> wrote:

ts = figure(plot_height=250, plot_width=500, x_axis_type='datetime', tools=TOOLS_ts)

I add a line:

ts_line1 = ts.line(x='date',
y='y',
source=source_ts,
color=color2,
line_width=3,
)

Then I try to add an image like this:

ts.image_url(url='url',x=0.5,y=0.5,h=.04,w=.20, source=source_ts)

This works perfectly fine when I do not have a timeseries, but now the image does not show up. I imagine it has something to do with setting the y value, so I tried insterting the unix timestamp, but that doesn't work.

What do I put in here for values? Also, the y axis is decimal values converted to percentages, could that also cause problems when I set it at 0.5 (indicating 50%)?

thanks

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/3c494bda-bba1-4ddd-af0b-0c980e862eee%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.