How to control axis position/ alignment

I’m looking for the solution as in the title. This is not Bokeh layout (gridplot). I’d appreciate any kind of help how to get an set the axis position when labels have not fixed length. The below code represents all plots’ settings.

def plot_contribution(name = 'p_contribution'):
    p = figure(frame_width=300, frame_height=300, match_aspect=False)
    return p

plot_2 = plot_contribution()
curdoc().add_root(plot_2)

Is there any particular reason for not using gridplot? Because this sort of problem is exactly what it tries to solve.

Solving it on your own would require a substantial amount of JS code and a deep understanding of Bokeh layout system.

Best bet here is to set e.g min_border_left to the same value on both plots (a value large enough to accommodate the longest label that will be shown)

Sorry to say, but this is not the best solution as all of my CDS are empty at the beginning. Also, since there are many examples in Dataset with dierent var names, min_border_left won’t work well.

Well, the layout is more complex thus I focused on css and flexgrid.

I’m afraid it is the best solution available, if you can’t use a gridplot with a vertical arrangement of plots.

I’ll be looking for a trade-off than :slight_smile: Thank you @Bryan, @p-himik

In terms of things that don’t yet exist yet, some things that might be reasonable to explore for future development:

  • an actual model for border padding that could shared between plots so that when updates so does the other
  • events for border padding changes so that JS callbacks could twiddle min_padding values if desired

Please feel free to open a GH issue to discuss any of these (or other) ideas