Does rect accept source?

When I try to update bar plots (using rect) in an app with Bokeh, I get error the following error, why?

bar_data = Instance(ColumnDataSource)

figure = figure(title_text_font_size=“12pt”,

						  plot_height=300,

							plot_width=300,

							tools=toolset,

							title='I/O throughput',

							logo=None)

figure.rect(‘x’, ‘y’, source=obj.bar_data, width=0.5, height=value, color = “#ff1200”)

and then, in an update_data(self) callback:

def update_data(self):

self.bar_data.data = dict(x=‘foo’, y=6)

I get:

plots[‘bar’].rect(‘x’, ‘y’, source=obj.bar_data, width=0.5, height=value, color = “#ff1200”)

NameError: name ‘value’ is not defined

ERROR:tornado.access:500 GET /bokeh/flight_match_rate/ (127.0.0.1) 122.41ms

Josh

Sorry – That was really silly. I found the problem (value was of course not defined)

Thanks!

···

On Thu, Feb 26, 2015 at 5:50 PM, Josh Wasserstein [email protected] wrote:

When I try to update bar plots (using rect) in an app with Bokeh, I get error the following error, why?

bar_data = Instance(ColumnDataSource)

figure = figure(title_text_font_size=“12pt”,

  					  plot_height=300,
  						plot_width=300,
  						tools=toolset,
  						title='I/O throughput',
  						logo=None)

figure.rect(‘x’, ‘y’, source=obj.bar_data, width=0.5, height=value, color = “#ff1200”)

and then, in an update_data(self) callback:

def update_data(self):

self.bar_data.data = dict(x=‘foo’, y=6)

I get:

plots[‘bar’].rect(‘x’, ‘y’, source=obj.bar_data, width=0.5, height=value, color = “#ff1200”)

NameError: name ‘value’ is not defined

ERROR:tornado.access:500 GET /bokeh/flight_match_rate/ (127.0.0.1) 122.41ms

Josh

Actually, guess I don’t know how to use data sources with rect plots. Can I use source? (rect seems to be designed to take width and height)

Josh

···

On Thu, Feb 26, 2015 at 5:51 PM, Josh Wasserstein [email protected] wrote:

Sorry – That was really silly. I found the problem (value was of course not defined)

Thanks!

On Thu, Feb 26, 2015 at 5:50 PM, Josh Wasserstein [email protected] wrote:

When I try to update bar plots (using rect) in an app with Bokeh, I get error the following error, why?

bar_data = Instance(ColumnDataSource)

figure = figure(title_text_font_size=“12pt”,

  					  plot_height=300,
  						plot_width=300,
  						tools=toolset,
  						title='I/O throughput',
  						logo=None)

figure.rect(‘x’, ‘y’, source=obj.bar_data, width=0.5, height=value, color = “#ff1200”)

and then, in an update_data(self) callback:

def update_data(self):

self.bar_data.data = dict(x=‘foo’, y=6)

I get:

plots[‘bar’].rect(‘x’, ‘y’, source=obj.bar_data, width=0.5, height=value, color = “#ff1200”)

NameError: name ‘value’ is not defined

ERROR:tornado.access:500 GET /bokeh/flight_match_rate/ (127.0.0.1) 122.41ms

Josh

Nevermind. Sorry for the repeated emails. I figured this out.

Josh

···

On Thu, Feb 26, 2015 at 5:52 PM, Josh Wasserstein [email protected] wrote:

Josh

Actually, guess I don’t know how to use data sources with rect plots. Can I use source? (rect seems to be designed to take width and height)

On Thu, Feb 26, 2015 at 5:51 PM, Josh Wasserstein [email protected]ail.com wrote:

Sorry – That was really silly. I found the problem (value was of course not defined)

Thanks!

On Thu, Feb 26, 2015 at 5:50 PM, Josh Wasserstein [email protected] wrote:

When I try to update bar plots (using rect) in an app with Bokeh, I get error the following error, why?

bar_data = Instance(ColumnDataSource)

figure = figure(title_text_font_size=“12pt”,

  					  plot_height=300,
  						plot_width=300,
  						tools=toolset,
  						title='I/O throughput',
  						logo=None)

figure.rect(‘x’, ‘y’, source=obj.bar_data, width=0.5, height=value, color = “#ff1200”)

and then, in an update_data(self) callback:

def update_data(self):

self.bar_data.data = dict(x=‘foo’, y=6)

I get:

plots[‘bar’].rect(‘x’, ‘y’, source=obj.bar_data, width=0.5, height=value, color = “#ff1200”)

NameError: name ‘value’ is not defined

ERROR:tornado.access:500 GET /bokeh/flight_match_rate/ (127.0.0.1) 122.41ms

Josh