ipython notebook arrange plots horizontally

前端 未结 4 543
谎友^
谎友^ 2021-02-02 13:11

Currently, when creating two consecutive plots in an ipython notebook, they are displayed one below the other:

\"ent

4条回答
  •  忘了有多久
    2021-02-02 13:47

    Because the question was posed quite some time ago, I will propose an updated solution for those finding this question via search engines.

    Since Jupyter has largely replaced the IPython notebook and Jupyter Lab is planned to replace Jupyter, my solution is implemented in Jupyter Lab 0.35.4.

    In this environment, I find it extremely useful to evaluate a cell that reads:

    %%html
    
    
    

    This allows for better utilization of vertical space by allowing outputs areas, especially plots, to float side by side. I wish a more refined variant of this were the default behavior.

    Browsers are not currently supporting CSS parent selectors, but according to the selectors level 4 working draft, it would be better to use something like the following if browsers start supporting it:

    %%html
    
    
    

提交回复
热议问题