Allow to customize layout arrangements

Hi,

I posted several questions on github issues which seem to have remained open and unanswered for a while (here and here), it seems like the holoviz development team is more active on discourse so I also post them here.

In summary, it is currently impossible to display plots in a customized manner on a Layout. In particular, it is impossible to arrange them from top to bottom then left to right. The only way to approach it is to use the Layout().opts(transpose=True) parameter, which is currently buggy as it does not transpose the plot titles(which is extremely important as they are the only piece of information allowing you to tell which chunk of our highly multidimensional datasets we are looking at).

In parallel, it is also a huge pain to reorder subplots in a different order than the alphabetical/numerical order of the kdims (if I want to show 10Hz above 5Hz above 1Hz instead of the default 1-5-10, I need to create an empty Layout and repopulate it in the right order by digging into the original Layout.data.keys()…).

Third, it is also impossible to precise a number of rows instead of a number of columns with Layout().cols(ncols).

To resolve all these problems, I think that Layout should have three new keywords:

  1. kdim_between_order, to decide whether to first layout by phase then by frequency for instance with [‘phase’, ‘frequency’]
  2. kdims_within_order, to decide in which order layout frequencies for instance [‘10’, ‘5’, ‘1’]
  3. layout_populate_direction, to decide to fill the layout left to right then top to bottom or vice versa (more intuitive than transposing the layout a posteriori, and would fix the titles issue…).

I might have missed features, this might already be implemented - if this is the case, thank you for letting me know!

Thank you for all your great work,
Maxime Beau