Skip to content

Commit 6640067

Browse files
author
minjk-bl
committed
Add inline code on Chart Style
1 parent ddcd693 commit 6640067

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

js/m_visualize/ChartSetting.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)