##// END OF EJS Templates
Merge branch 'inlinefont'...
MinRK -
r3355:bf6ff922 merge
parent child Browse files
Show More
@@ -216,9 +216,23 b' def import_pylab(user_ns, backend, import_all=True, shell=None):'
216 from IPython.zmq.pylab.backend_inline import flush_svg
216 from IPython.zmq.pylab.backend_inline import flush_svg
217 from matplotlib import pyplot
217 from matplotlib import pyplot
218 shell.register_post_execute(flush_svg)
218 shell.register_post_execute(flush_svg)
219 # The typical default figure size is too large for inline use. We
219 # The typical default figure size is too large for inline use,
220 # might make this a user-configurable parameter later.
220 # so we shrink the figure size to 6x4, and tweak fonts to
221 figsize(6.0, 4.0)
221 # make that fit. This is configurable via Global.pylab_inline_rc,
222 # or rather it will be once the zmq kernel is hooked up to
223 # the config system.
224
225 default_rc = {
226 'figure.figsize': (6.0,4.0),
227 # 12pt labels get cutoff on 6x4 logplots, so use 10pt.
228 'font.size': 10,
229 # 10pt still needs a little more room on the xlabel:
230 'figure.subplot.bottom' : .125
231 }
232 rc = getattr(shell.config.Global, 'pylab_inline_rc', default_rc)
233 pyplot.rcParams.update(rc)
234 shell.config.Global.pylab_inline_rc = rc
235
222 # Add 'figsize' to pyplot and to the user's namespace
236 # Add 'figsize' to pyplot and to the user's namespace
223 user_ns['figsize'] = pyplot.figsize = figsize
237 user_ns['figsize'] = pyplot.figsize = figsize
224 shell.user_ns_hidden['figsize'] = figsize
238 shell.user_ns_hidden['figsize'] = figsize
General Comments 0
You need to be logged in to leave comments. Login now