问题
My cell output in Jupyter Notebook is cut off on the left hand side which obscures the leftmost output. For reference (I can't post images yet):
https://imgur.com/gallery/rg759nN
Any idea how to fix this?
EDIT: Thanks to rabbit on below, the problem seems to be caused by using the alternate themes provided by Jupyter Themes
回答1:
Found the solution on Jupyter Themes github page:
https://github.com/dunovank/jupyter-themes/issues/288
"In the custom.css file, I fixed it by changing both the div.out_prompt_overlay.prompt's and the div.out_prompt_overlay.prompt:hover's min-width and width values to 11.5ex instead of the original 14.5ex."
Alternatively I added the padding:
div.output_area {
display: -webkit-box;
padding: 13px;
}
To the chesterish.css file (which was the theme I was using) and reapplied the theme using jupyter themes.
回答2:
- Ctrl + Shift + C to open DevTools in the browser.
- go to Sources and click on static
- search for: div.output_area
- change padding to 13px
(The developer missed 1 and put only 3px distance)
回答3:
This was raised as a bug and fixed (see https://github.com/dunovank/jupyter-themes/issues/273). As stated by Ernest in a comment: the solution is to upgrade the package and load the theme again i.e.
pip install --upgrade jupyterthemes
jt -t {theme}
来源:https://stackoverflow.com/questions/52725612/jupyter-notebook-cell-output-cut-off-truncated-by-margin-caused-by-jupyter-theme