Unfortunately my second graph overlaps the first one. Is their a possibility to control the alignment if graphs share their x-axis?
here my code:
create a new plot
s2 = figure(plot_width=900, plot_height=400, tools=“”,
#x_range=dfnew.index,
y_range=Range1d(start=0, end=60),
toolbar_sticky=False, active_scroll=None, active_drag=None, active_tap=None)
Adding the second axis to the plot
s2.extra_y_ranges = {“v”: Range1d(start=0, end=dfnew.v.max() + (dfnew.v.max()*0.1))}
Setting the second y axis range name and range
s2.add_layout(LinearAxis(y_range_name=“v”), ‘right’)
create vbars with conversions
s2.vbar(x=dfnew.index, top=dfnew.c, width=0.3, bottom=0, alpha=0.5, color=“green”)
create another vbars with all conversion values on secondary y-axis
s2.vbar(x=dfnew.index, top=dfnew.v, width=0.3, bottom=0, alpha=0.8, color=“red”, y_range_name=‘v’)
show the results
show(s2)
