@@ -130,11 +130,6 @@ define([
130
130
// accBoxImport.setOpenBox(true);
131
131
sbTagString . clear ( ) ;
132
132
sbTagString . appendFormatLine ( '<div class="{0}">' , 'vp-import-box' ) ;
133
- // import
134
- sbTagString . appendLine ( '<div>' ) ;
135
- sbTagString . appendFormatLine ( '<label for="{0}" class="{1}">{2}</label>' , 'vp_plImport' , '' , 'Matplot.pyplot as' ) ;
136
- sbTagString . appendFormatLine ( '<input type="text" id="{0}" placeholder="{1}" value="{2}" disabled>' , 'vp_plImport' , 'alias' , 'plt' ) ;
137
- sbTagString . appendLine ( '</div>' ) ;
138
133
// figure size
139
134
sbTagString . appendLine ( '<div>' ) ;
140
135
sbTagString . appendFormatLine ( '<label for="{0}" class="{1}">{2}</label>' , 'vp_plFigureWidth' , '' , 'Figure size' ) ;
@@ -160,7 +155,7 @@ define([
160
155
sbTagString . appendLine ( '</div>' ) ;
161
156
// import button
162
157
sbTagString . appendLine ( '<div>' ) ;
163
- sbTagString . appendFormatLine ( '<input type="button" id="{0}" class="{1}" value="{2}">' , 'vp_plImportRun' , 'vp-button activated vp-pl-import-run' , 'Import ' ) ;
158
+ sbTagString . appendFormatLine ( '<input type="button" id="{0}" class="{1}" value="{2}">' , 'vp_plImportRun' , 'vp-button activated vp-pl-import-run' , 'Apply ' ) ;
164
159
sbTagString . appendLine ( '</div>' ) ;
165
160
166
161
sbTagString . appendLine ( '</div>' ) ;
@@ -468,7 +463,7 @@ define([
468
463
// run cell
469
464
$ ( vpCommon . wrapSelector ( '#vp_appsCode' ) ) . trigger ( {
470
465
type : 'popup_run' ,
471
- title : 'Snippets ' ,
466
+ title : 'Background ' ,
472
467
code : code ,
473
468
addCell : true ,
474
469
runCell : true
@@ -1098,14 +1093,12 @@ define([
1098
1093
var code = new sb . StringBuilder ( ) ;
1099
1094
1100
1095
// get parameters
1101
- var alias = $ ( this . wrapSelector ( '#vp_plImport' ) ) . val ( ) ;
1102
1096
var figWidth = $ ( this . wrapSelector ( '#vp_plFigureWidth' ) ) . val ( ) ;
1103
1097
var figHeight = $ ( this . wrapSelector ( '#vp_plFigureHeight' ) ) . val ( ) ;
1104
1098
var styleName = $ ( this . wrapSelector ( '#vp_plStyle' ) ) . val ( ) ;
1105
1099
var fontName = $ ( this . wrapSelector ( '#vp_plFontName' ) ) . val ( ) ;
1106
1100
var fontSize = $ ( this . wrapSelector ( '#vp_plFontSize' ) ) . val ( ) ;
1107
1101
1108
- code . appendLine ( 'import matplotlib.pyplot as plt' ) ;
1109
1102
code . appendFormatLine ( "plt.rc('figure', figsize=({0}, {1}))" , figWidth , figHeight ) ;
1110
1103
if ( styleName && styleName . length > 0 ) {
1111
1104
code . appendFormatLine ( "plt.style.use('{0}')" , styleName ) ;
0 commit comments