i want plot 2 bar charts on same figure.
one have positive values, 1 have negative values.
i want positive bars in green (above x-axis) , negative bars in red (below x-axis)
questions:
1. possible existing highlevel bar method in bokeh.charts interface?
2. if not, how can create bar chart using lower level bokeh.plotting interface? (rather higher level bokeh.charts interface)
1. tried doing multiple bar charts using highlevel bar method however, not achieve wanted , used plotting interface.
2. looking for?
bokeh.plotting import figure, output_file, show plot = figure(width=600, height=600, x_range=(0,50), y_range=(-10,10)) plot.quad(top=[10],bottom=[0],left=[1],right=[2], color='green', line_color='black', legend='positive') plot.quad(top=[12],bottom=[0],left=[2],right=[3], color='green', line_color='black', legend='positive') plot.quad(top=[1],bottom=[0],left=[3],right=[4], color='green', line_color='black', legend='positive') plot.quad(top=[2],bottom=[0],left=[4],right=[5], color='green', line_color='black', legend='positive') plot.quad(top=[3],bottom=[0],left=[5],right=[6], color='green', line_color='black', legend='positive') plot.quad(top=[4],bottom=[0],left=[6],right=[7], color='green', line_color='black', legend='positive') plot.quad(top=[-5],bottom=[0],left=[1],right=[2], color='red', line_color='black', legend='negative') plot.quad(top=[-6],bottom=[0],left=[2],right=[3], color='red', line_color='black', legend='negative') plot.quad(top=[-2],bottom=[0],left=[3],right=[4], color='red', line_color='black', legend='negative') plot.quad(top=[-8],bottom=[0],left=[4],right=[5], color='red', line_color='black', legend='negative') plot.quad(top=[-9],bottom=[0],left=[5],right=[6], color='red', line_color='black', legend='negative') plot.quad(top=[-10],bottom=[0],left=[6],right=[7], color='red', line_color='black', legend='negative') output_file('test.html') show(plot)
Comments
Post a Comment