SciRuby / daru-view

daru-view is for easy and interactive plotting in web application & IRuby notebook. daru-view is a plugin gem to the existing daru gem.
https://sciruby.github.io/daru-view/
MIT License
95 stars 20 forks source link

Flexibility in displaying multiple plots #154

Open contradictioned opened 4 years ago

contradictioned commented 4 years ago

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

Shekharrajak commented 4 years ago

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 commented 4 years ago

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.