I just upgraded to IPython 1.0 and the new laptop interface works very well. On my screen, the default width is now around 50% of the page, which improves readability. However, I often work with long timings, which I prefer to display as wide as possible.
Very wide shots will only expand to the right. Is there a way to display the output wider than the default value for expanding in the center?
The attached image shows the normal embedded graph in the first cell, which is less wide than the default width for a laptop. The second plot is wider and expands to the right. This leaves the left quarter of my screen unused.
, @tooblippe, , . , , . ipython==3.1.0. , Jupyter, Jupyter.
ipython==3.1.0
Jupyter
, : css, ipython ipython:
.output_png { display: table-cell; text-align: center; vertical-align: middle; }
. , .
- . .
CSS :
from IPython.core.display import HTML def css_styling(): styles = open("custom.css", "r").read() #or edit path to custom.css return HTML(styles) css_styling()
CSS github repo :
matplotlibrc. , . , matplotlib .
import json s = json.load( open("bmh_matplotlibrc.json") ) #edit path to json file matplotlib.rcParams.update(s)
JSON GITHUB
, . CSS :
~/.jupyter/custom/custom.css
, :
from IPython.core.display import HTML HTML(""" <style> .output_png { display: table-cell; text-align: right; vertical-align: middle; } </style> """)
, <style></style>.
<style></style>
, ( ).
vertical-align:middle . , Jupyter ( , , ) .prompt . , :
vertical-align:middle
.prompt
.output_png { display: table-cell; text-align: center; margin:auto; } .prompt display:none; }
, display:none .prompt in[] out[] , , . , .
display:none
in[]
out[]