Reputation: 934
Consider bar plots in bokeh (python) http://docs.bokeh.org/en/0.11.0/docs/user_guide/charts.html
On the Y-axis, we always see label like "SUM(NAME)", here "SUM" is name of aggregation function (can be mean ...).
Question Is there any way to suppress it ? Just to see "NAME" ?
Example:
data = {
'L': ['A','B', 'C'],
'NAME': [100, 2, 200]
}
bar = Bar(data, values='NAME', plot_height=400, label=['L'], legend = None, title="someTitle", plot_width=400)
Upvotes: 1
Views: 283
Reputation: 59701
If you update to Bokeh 0.12.* you can do this:
from bokeh.io import show, output_file
from bokeh.plotting import figure
output_file('bar_colors.html')
data = {
'L': ['A','B', 'C'],
'NAME': [100, 2, 200],
}
p = figure(x_range=data['L'], y_range=(0,300), plot_height=400, plot_width=400,
title='someTitle', toolbar_location=None, tools='')
p.vbar(x='L', top='NAME', width=0.9, legend=None, source=data)
p.xgrid.grid_line_color = None
p.yaxis.axis_label = 'NAME'
show(p)
Result:
Upvotes: 2