daru-view icon indicating copy to clipboard operation
daru-view copied to clipboard

Flexibility in displaying multiple plots

Open contradictioned opened this issue 5 years ago • 2 comments

If I understand correctly, a cell in a Jupyter notebook can only render one output. In case of Daru this can be done by calling my_graph.show_in_iruby. In order to render multiple (n) plots in a single output, there's Daru::View::PlotList which constructs a table with n columns and a single row. If the individual plots are too big, this table would overflow and the user needs to scroll sideways (see attached screenshot).

Is there a better way to display multiple plots, especially without horizontal scrolling? If not (and you are interested) I'd also take look into that, not sure if it suffices to give a num_cols parameter for the construction of the table to limit the number of columns, or wrap the individual plots inside a flexbox container.

Screenshot 2019-11-11 at 09 57 02

contradictioned avatar Nov 11 '19 11:11 contradictioned

wrap the individual plots inside a flexbox container.

This idea is good. Feel free to work on it. I would love to help you with that.

Shekharrajak avatar Nov 13 '19 15:11 Shekharrajak

I think we need to have a css in our iruby template which generate the HTML code for the cell. It should not be much difficult but need to have bit knowledge of js, css dependency daru-view is using, so that in built css can be used here.

Shekharrajak avatar Mar 21 '20 08:03 Shekharrajak