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