@@ -75,7 +75,6 @@ define([
7575var code = new com_String ( ) ;
7676// FIXME: convert it to kernelApi
7777code . appendLine ( 'import matplotlib.pyplot as plt' ) ;
78- code . appendLine ( '%matplotlib inline' ) ;
7978code . appendLine ( 'import json' ) ;
8079code . append ( `print(json.dumps([{ 'label': s, 'value': s } for s in plt.style.available]))` ) ;
8180vpKernel . execute ( code . toString ( ) ) . then ( function ( resultObj ) {
@@ -125,8 +124,8 @@ define([
125124generateImportCode ( ) {
126125var code = new com_String ( ) ;
127126code . appendLine ( 'import matplotlib.pyplot as plt' ) ;
128- code . appendLine ( 'import seaborn as sns' ) ;
129127code . append ( '%matplotlib inline' ) ;
128+ code . appendLine ( 'import seaborn as sns' ) ;
130129return [ code . toString ( ) ] ;
131130}
132131
@@ -143,6 +142,7 @@ define([
143142let { figureWidth, figureHeight, styleSheet, fontName, fontSize} = this . state ;
144143
145144code . appendLine ( 'import matplotlib.pyplot as plt' ) ;
145+ code . appendLine ( '%matplotlib inline' ) ;
146146code . appendLine ( 'import seaborn as sns' ) ;
147147code . appendFormatLine ( "plt.rc('figure', figsize=({0}, {1}))" , figureWidth , figureHeight ) ;
148148if ( styleSheet && styleSheet . length > 0 ) {