Show More
@@ -3455,6 +3455,17 b' Defaulting color scheme to \'NoColor\'"""' | |||
|
3455 | 3455 | It will import at the top level numpy as np, pyplot as plt, matplotlib, |
|
3456 | 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 | 3469 | Parameters |
|
3459 | 3470 | ---------- |
|
3460 | 3471 | guiname : optional |
@@ -3465,19 +3476,21 b' Defaulting color scheme to \'NoColor\'"""' | |||
|
3465 | 3476 | |
|
3466 | 3477 | Examples |
|
3467 | 3478 | -------- |
|
3468 | In this case, where the MPL default is TkAgg: | |
|
3469 | In [2]: %pylab | |
|
3479 | In this case, where the MPL default is TkAgg:: | |
|
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. | |
|
3472 | Backend in use: TkAgg | |
|
3473 | For more information, type 'help(pylab)'. | |
|
3487 | But you can explicitly request a different backend:: | |
|
3474 | 3488 | |
|
3475 | But you can explicitly request a different backend: | |
|
3476 | In [3]: %pylab qt | |
|
3489 | In [3]: %pylab qt | |
|
3477 | 3490 | |
|
3478 | Welcome to pylab, a matplotlib-based Python environment. | |
|
3479 | Backend in use: Qt4Agg | |
|
3480 | For more information, type 'help(pylab)'. | |
|
3491 | Welcome to pylab, a matplotlib-based Python environment. | |
|
3492 | Backend in use: Qt4Agg | |
|
3493 | For more information, type 'help(pylab)'. | |
|
3481 | 3494 | """ |
|
3482 | 3495 | |
|
3483 | 3496 | if Application.initialized(): |
@@ -3614,13 +3627,11 b' Defaulting color scheme to \'NoColor\'"""' | |||
|
3614 | 3627 | def magic_config(self, s): |
|
3615 | 3628 | """configure IPython |
|
3616 | 3629 | |
|
3617 | %config Class.trait=value | |
|
3618 | or | |
|
3619 | %config Class | |
|
3630 | %config Class[.trait=value] | |
|
3620 | 3631 | |
|
3621 | 3632 | This magic exposes most of the IPython config system. Any |
|
3622 | 3633 | Configurable class should be able to be configured with the simple |
|
3623 | line: | |
|
3634 | line:: | |
|
3624 | 3635 | |
|
3625 | 3636 | %config Class.trait=value |
|
3626 | 3637 | |
@@ -3630,34 +3641,38 b' Defaulting color scheme to \'NoColor\'"""' | |||
|
3630 | 3641 | Examples |
|
3631 | 3642 | -------- |
|
3632 | 3643 | |
|
3633 | To see what classes are availabe for config, pass no arguments: | |
|
3634 | In [1]: %config | |
|
3635 | Available objects for config: | |
|
3636 | TerminalInteractiveShell | |
|
3637 | HistoryManager | |
|
3638 |
|
|
|
3639 |
|
|
|
3640 | IPCompleter | |
|
3641 |
|
|
|
3642 | ||
|
3643 | # To view what is configurable on a given class, just pass the class name | |
|
3644 | In [2]: %config IPCompleter | |
|
3645 | IPCompleter options | |
|
3646 | ----------------- | |
|
3647 |
IPCompleter |
|
|
3648 | Current: False | |
|
3649 | Activate greedy completion | |
|
3650 | This will enable completion on elements of lists, results of function calls, | |
|
3651 | etc., but can be unsafe because the code is actually evaluated on TAB. | |
|
3652 | ||
|
3653 | # but the real use is in setting values: | |
|
3654 | In [3]: %config IPCompleter.greedy = True | |
|
3655 | ||
|
3656 | # and these values are read from the user_ns if they are variables: | |
|
3657 | In [4]: feeling_greedy=False | |
|
3658 | ||
|
3659 | In [5]: %config IPCompleter.greedy = feeling_greedy | |
|
3660 | ||
|
3644 | To see what classes are availabe for config, pass no arguments:: | |
|
3645 | ||
|
3646 | In [1]: %config | |
|
3647 | Available objects for config: | |
|
3648 | TerminalInteractiveShell | |
|
3649 | HistoryManager | |
|
3650 | PrefilterManager | |
|
3651 | AliasManager | |
|
3652 | IPCompleter | |
|
3653 | DisplayFormatter | |
|
3654 | ||
|
3655 | To view what is configurable on a given class, just pass the class name:: | |
|
3656 | ||
|
3657 | In [2]: %config IPCompleter | |
|
3658 | IPCompleter options | |
|
3659 | ----------------- | |
|
3660 | IPCompleter.greedy=<CBool> | |
|
3661 | Current: False | |
|
3662 | Activate greedy completion | |
|
3663 | This will enable completion on elements of lists, results of function calls, | |
|
3664 | etc., but can be unsafe because the code is actually evaluated on TAB. | |
|
3665 | ||
|
3666 | but the real use is in setting values:: | |
|
3667 | ||
|
3668 | In [3]: %config IPCompleter.greedy = True | |
|
3669 | ||
|
3670 | and these values are read from the user_ns if they are variables:: | |
|
3671 | ||
|
3672 | In [4]: feeling_greedy=False | |
|
3673 | ||
|
3674 | In [5]: %config IPCompleter.greedy = feeling_greedy | |
|
3675 | ||
|
3661 | 3676 | """ |
|
3662 | 3677 | from IPython.config.loader import Config |
|
3663 | 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