##// END OF EJS Templates
add reference to `%config InlineBackend` in %pylab docstring...
MinRK -
Show More
@@ -3455,6 +3455,17 b' Defaulting color scheme to \'NoColor\'"""'
3455 It will import at the top level numpy as np, pyplot as plt, matplotlib,
3455 It will import at the top level numpy as np, pyplot as plt, matplotlib,
3456 pylab and mlab, as well as all names from numpy and pylab.
3456 pylab and mlab, as well as all names from numpy and pylab.
3457
3457
3458 If you are using the inline matplotlib backend for embedded figures,
3459 you can adjust its behavior via the %config magic::
3460
3461 # enable SVG figures, necessary for SVG+XHTML export in the qtconsole
3462 In [1]: %config InlineBackend.figure_format = 'svg'
3463
3464 # change the behavior of closing all figures at the end of each
3465 # execution (cell), or allowing reuse of active figures across
3466 # cells:
3467 In [2]: %config InlineBackend.close_figures = False
3468
3458 Parameters
3469 Parameters
3459 ----------
3470 ----------
3460 guiname : optional
3471 guiname : optional
@@ -3465,19 +3476,21 b' Defaulting color scheme to \'NoColor\'"""'
3465
3476
3466 Examples
3477 Examples
3467 --------
3478 --------
3468 In this case, where the MPL default is TkAgg:
3479 In this case, where the MPL default is TkAgg::
3469 In [2]: %pylab
3480
3481 In [2]: %pylab
3482
3483 Welcome to pylab, a matplotlib-based Python environment.
3484 Backend in use: TkAgg
3485 For more information, type 'help(pylab)'.
3470
3486
3471 Welcome to pylab, a matplotlib-based Python environment.
3487 But you can explicitly request a different backend::
3472 Backend in use: TkAgg
3473 For more information, type 'help(pylab)'.
3474
3488
3475 But you can explicitly request a different backend:
3489 In [3]: %pylab qt
3476 In [3]: %pylab qt
3477
3490
3478 Welcome to pylab, a matplotlib-based Python environment.
3491 Welcome to pylab, a matplotlib-based Python environment.
3479 Backend in use: Qt4Agg
3492 Backend in use: Qt4Agg
3480 For more information, type 'help(pylab)'.
3493 For more information, type 'help(pylab)'.
3481 """
3494 """
3482
3495
3483 if Application.initialized():
3496 if Application.initialized():
@@ -3614,13 +3627,11 b' Defaulting color scheme to \'NoColor\'"""'
3614 def magic_config(self, s):
3627 def magic_config(self, s):
3615 """configure IPython
3628 """configure IPython
3616
3629
3617 %config Class.trait=value
3630 %config Class[.trait=value]
3618 or
3619 %config Class
3620
3631
3621 This magic exposes most of the IPython config system. Any
3632 This magic exposes most of the IPython config system. Any
3622 Configurable class should be able to be configured with the simple
3633 Configurable class should be able to be configured with the simple
3623 line:
3634 line::
3624
3635
3625 %config Class.trait=value
3636 %config Class.trait=value
3626
3637
@@ -3630,34 +3641,38 b' Defaulting color scheme to \'NoColor\'"""'
3630 Examples
3641 Examples
3631 --------
3642 --------
3632
3643
3633 To see what classes are availabe for config, pass no arguments:
3644 To see what classes are availabe for config, pass no arguments::
3634 In [1]: %config
3645
3635 Available objects for config:
3646 In [1]: %config
3636 TerminalInteractiveShell
3647 Available objects for config:
3637 HistoryManager
3648 TerminalInteractiveShell
3638 PrefilterManager
3649 HistoryManager
3639 AliasManager
3650 PrefilterManager
3640 IPCompleter
3651 AliasManager
3641 DisplayFormatter
3652 IPCompleter
3642
3653 DisplayFormatter
3643 # To view what is configurable on a given class, just pass the class name
3654
3644 In [2]: %config IPCompleter
3655 To view what is configurable on a given class, just pass the class name::
3645 IPCompleter options
3656
3646 -----------------
3657 In [2]: %config IPCompleter
3647 IPCompleter.greedy=<CBool>
3658 IPCompleter options
3648 Current: False
3659 -----------------
3649 Activate greedy completion
3660 IPCompleter.greedy=<CBool>
3650 This will enable completion on elements of lists, results of function calls,
3661 Current: False
3651 etc., but can be unsafe because the code is actually evaluated on TAB.
3662 Activate greedy completion
3652
3663 This will enable completion on elements of lists, results of function calls,
3653 # but the real use is in setting values:
3664 etc., but can be unsafe because the code is actually evaluated on TAB.
3654 In [3]: %config IPCompleter.greedy = True
3665
3655
3666 but the real use is in setting values::
3656 # and these values are read from the user_ns if they are variables:
3667
3657 In [4]: feeling_greedy=False
3668 In [3]: %config IPCompleter.greedy = True
3658
3669
3659 In [5]: %config IPCompleter.greedy = feeling_greedy
3670 and these values are read from the user_ns if they are variables::
3660
3671
3672 In [4]: feeling_greedy=False
3673
3674 In [5]: %config IPCompleter.greedy = feeling_greedy
3675
3661 """
3676 """
3662 from IPython.config.loader import Config
3677 from IPython.config.loader import Config
3663 # get list of class names for configurables that have someting to configure:
3678 # get list of class names for configurables that have someting to configure:
General Comments 0
You need to be logged in to leave comments. Login now