-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7de35c
commit b2d402d
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
# ----------------------------------------------------------------------------- | ||
# Copyright (c) 2018- Spyder Kernels Contributors | ||
# | ||
# Licensed under the terms of the MIT License | ||
# (see spyder_kernels/__init__.py for details) | ||
# ----------------------------------------------------------------------------- | ||
|
||
from metakernel import Magic | ||
|
||
|
||
class MatplotlibMagic(Magic): | ||
|
||
def line_matplotlib(self, gui): | ||
""" | ||
Mosas | ||
""" | ||
from ipykernel.eventloops import enable_gui | ||
from IPython.core.interactiveshell import InteractiveShell | ||
|
||
ipyshell = InteractiveShell() | ||
ipyshell.enable_gui = enable_gui | ||
ipyshell.enable_matplotlib(gui=gui) | ||
|
||
|
||
def register_magics(kernel): | ||
kernel.register_magics(MatplotlibMagic) |