resize ipython notebook output window

后端 未结 9 1332
伪装坚强ぢ
伪装坚强ぢ 2020-12-02 12:04

By default the ipython notebook ouput is limited to a small sub window at the bottom. This makes us force to use separate scroll bar that comes with the output window, when

相关标签:
9条回答
  • 2020-12-02 12:29

    In JupyterLab you can right click and choose: Create New View for Output.

    0 讨论(0)
  • 2020-12-02 12:34

    This worked for me in Chrome. Run it in a separate cell. Choose the max-height you want to display without scrolling.

    %%html
    <style>
    .output_wrapper, .output {
        height:auto !important;
        max-height:1000px;  /* your desired max-height here */
    }
    .output_scroll {
        box-shadow:none !important;
        webkit-box-shadow:none !important;
    }
    </style>
    

    You'll still get scroll bars if the contents exceed the max-height. There won't be a shadow box, though. Just increase the max-height even more if really don't want scrolling at all.

    0 讨论(0)
  • 2020-12-02 12:35

    To resize the height of the scrollable output I do the following (you can change 44em):

    from IPython.core.display import display, HTML
    display(HTML("<style>div.output_scroll { height: 44em; }</style>"))
    
    0 讨论(0)
提交回复
热议问题