X and Y axis labels for Bokeh figure

user3361508 picture user3361508 · Jun 10, 2014 · Viewed 36.4k times · Source

Does anyone know how to add x and y axis title/labels for a Bokeh figure? E.g. X-axis: time, Y-axis: stock price.

Thanks a lot!

Answer

thorbjornwolf picture thorbjornwolf · Jul 16, 2014

As of Bokeh 0.11.1, the user's guide section on axes now shows how to edit properties of existing axes. The way to do it is the same as before:

p = figure(width=300, height=300, x_axis_label='Initial xlabel')
p.xaxis.axis_label = 'New xlabel'