Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit38bf7d0

Browse files
authored
Merge pull request#140 from minjk-bl/devops
Hotfix for 2.2.5
2 parentsc9b0c23 +fe98a89 commit38bf7d0

File tree

14 files changed

+222
-98
lines changed

14 files changed

+222
-98
lines changed

‎html/m_visualize/seaborn.html‎

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,29 +114,34 @@
114114
<!-- Auto-create -->
115115
</select>
116116
</div>
117-
<divclass="vp-grid-box sb-option">
118-
<label><inputtype="checkbox"id="showValues"class="vp-state"/><span>Show values</span></label>
119-
<inputtype="number"id="showValuesPrecision"class="vp-state"placeholder="Type precision (0 ~ 5)"min="0"max="5"/>
120-
</div>
121-
<divclass="vp-grid-col-p50 sb-option"style="grid-column-start: 1;grid-column-end: 3;">
122-
<divclass="vp-grid-box">
123-
<labelclass="vp-bold">Sort values by
124-
<selectid="sortBy"class="vp-state vp-select"style="width: 75px;height:25px;">
117+
<divclass="vp-grid-box sb-option"style="grid-column-start: 1;grid-column-end: 3;">
118+
<hrstyle="margin:5px;"/>
119+
<labelclass="vp-tab-group-title">Sort</label>
120+
<divclass="vp-grid-col-p50">
121+
<divclass="vp-grid-col-95">
122+
<labelfor="sortType">Order</label>
123+
<selectid="sortType"class="vp-state vp-select m">
124+
<optionvalue="">No sorting</option>
125+
<optionvalue="descending">Sort in descending order</option>
126+
<optionvalue="ascending">Sort in ascending order</option>
127+
</select>
128+
</div>
129+
<divclass="vp-grid-col-95">
130+
<labelfor="sortBy">Sort by</label>
131+
<selectid="sortBy"class="vp-state vp-select m">
125132
<optionvalue="y">y axis</option>
126133
<optionvalue="x">x axis</option>
127134
</select>
128-
</label>
129-
<selectid="sortType"class="vp-state">
130-
<optionvalue="">No sorting</option>
131-
<optionvalue="descending">Sort in descending order</option>
132-
<optionvalue="ascending">Sort in ascending order</option>
133-
</select>
135+
</div>
134136
</div>
135-
<divclass="vp-grid-box">
136-
<labelclass="vp-bold">Sort condition</label>
137-
<inputtype="text"id="sortHue"class="vp-input vp-state"placeholder="Type hue condition"/>
138-
<label><inputtype="checkbox"id="sortHueText"class="vp-state"/><span>Text</span></label>
137+
<divclass="vp-grid-col-95 sb-option">
138+
<labelfor="sortHue">Hue condition</label>
139+
<div>
140+
<inputtype="text"id="sortHue"class="vp-input vp-state"placeholder="Type hue condition"/>
141+
<label><inputtype="checkbox"id="sortHueText"class="vp-state"checked/><span>Text</span></label>
142+
</div>
139143
</div>
144+
<hrstyle="margin:5px;"/>
140145
</div>
141146
</div>
142147
<labelfor="userOption"class="vp-bold">User Option</label>
@@ -207,7 +212,16 @@
207212
<inputtype="text"id="y_label"class="vp-input vp-state"placeholder="Type Y Label"/>
208213
</div>
209214
</div>
210-
215+
<divclass="vp-grid-box sb-option">
216+
<hrstyle="margin:5px;"/>
217+
<labelclass="vp-tab-group-title">Show values</label>
218+
<label><inputtype="checkbox"id="showValues"class="vp-state"/><span>Show values on the top of bar</span></label>
219+
<divclass="vp-grid-col-95">
220+
<labelfor="showValuesPrecision">Decimal place</label>
221+
<inputtype="number"id="showValuesPrecision"class="vp-state"placeholder="Type decimal places(0~5)"min="0"max="5"/>
222+
</div>
223+
<hrstyle="margin:5px;"/>
224+
</div>
211225
<labelfor="useLegend"class="vp-bold">Legend</label>
212226
<divclass="vp-grid-col-p50">
213227
<selectid="legendPos"class="vp-select vp-state">

‎js/com/com_Config.js‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,14 @@ define([
104104
'%matplotlib inline'
105105
]
106106
},
107-
{library:'seaborn',alias:'sns'}
107+
{library:'seaborn',alias:'sns'},
108+
{
109+
library:'plotly.express',alias:'px',
110+
include:[
111+
'from plotly.offline import init_notebook_mode',
112+
'init_notebook_mode(connected=True)'
113+
]
114+
}
108115
]
109116
}
110117

@@ -142,7 +149,7 @@ define([
142149
type:'package'
143150
},
144151
'px':{
145-
code:'import plotly.express as px',
152+
code:'import plotly.express as px\nfrom plotly.offline import init_notebook_mode\ninit_notebook_mode(connected=True)',
146153
type:'package'
147154
},
148155
'WordCloud':{
@@ -251,6 +258,7 @@ define([
251258
'fileNaviCommand.py',
252259
'pandasCommand.py',
253260
'variableCommand.py',
261+
'visualizationCommand.py',
254262
// 'userCommand.py'
255263
];
256264
letpromiseList=[];

‎js/com/component/PopupComponent.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,9 @@ define([
709709
*/
710710
checkRequiredOption(){
711711
letrequiredFilled=true;
712-
letrequiredTags=$(this.wrapSelector('input[required=true],input[required=required]'));
712+
letrequiredTags=$(this.wrapSelector('input[required=true]')+','+this.wrapSelector('input[required=required]'));
713+
714+
vpLog.display(VP_LOG_TYPE.DEVELOP,'checkRequiredOption',this,requiredTags);
713715

714716
if(requiredTags){
715717
for(leti=0;i<requiredTags.length;i++){

‎js/m_apps/Import.js‎

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ define([
2929
,include:[
3030
'%matplotlib inline'
3131
]
32+
},
33+
{i0:'seaborn',i1:'sns',type:'module'},
34+
{
35+
i0:'plotly.express',i1:'px',type:'module'
36+
,include:[
37+
'from plotly.offline import init_notebook_mode',
38+
'init_notebook_mode(connected=True)'
39+
]
3240
}
3341
],
3442
'machine-learning':[
@@ -46,7 +54,6 @@ define([
4654
/** Write codes executed before rendering */
4755
this.config.dataview=false;
4856
this.config.sizeLevel=1;
49-
this.config.checkModules=['pd'];
5057

5158
letsavedData=vpConfig.getDataSimple('','vpimport');
5259
// Reset abnormal data
@@ -243,14 +250,19 @@ define([
243250
// module
244251
sbCode.appendFormat("import {0}{1}",pacI0,((pacI1===undefined||pacI1==="") ?"" :(" as "+pacI1)));
245252
}
246-
}
247253

248-
// Need additional code?
249-
if(pacI0=='matplotlib.pyplot'||pacI0=='matplotlib'){
250-
sbCode.appendLine();
251-
sbCode.append('%matplotlib inline');
254+
// Need additional code?
255+
if(pacI0=='matplotlib.pyplot'||pacI0=='matplotlib'){
256+
sbCode.appendLine();
257+
sbCode.append('%matplotlib inline');
258+
}
259+
if(pacI0=='plotly.express'||pacI0=='plotly'){
260+
sbCode.appendLine();
261+
sbCode.appendLine('from plotly.offline import init_notebook_mode');
262+
sbCode.append('init_notebook_mode(connected=True)');
263+
}
252264
}
253-
265+
254266
importMeta.push({i0:pacI0,i1:pacI1,type:pacType,checked:pacChecked});
255267
}
256268
this.state.importMeta=importMeta;

‎js/m_apps/Profiling.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ define([
8282
code.append(saveas);
8383
break;
8484
}
85-
com_interface.insertCell('code',code.toString(),true,'Data Analysis > Profiling');
86-
that.loadReportList();
85+
that.checkAndRunModules(true).then(function(){
86+
com_interface.insertCell('code',code.toString(),true,'Data Analysis > Profiling');
87+
that.loadReportList();
88+
});
8789
});
8890
}
8991

‎js/m_ml/DataSets.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ define([
3030
super._init();
3131
this.config.sizeLevel=2;
3232
this.config.dataview=false;
33+
this.config.checkModules=['pd'];
3334

3435
this.state={
3536
loadType:'load_boston',

‎js/m_ml/ModelInfo.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ define([
438438
options:[
439439
{name:'fi_featureData',label:'Feature Data',component:['data_select'],var_type:['DataFrame','Series','ndarray','list','dict'],value:'X_train'},
440440
{name:'sort',label:'Sort data',component:['bool_checkbox'],value:true,usePair:true},
441-
{name:'top_count',label:'Top count',component:['input_number'],min:0,max:5,usePair:true},
441+
{name:'top_count',label:'Top count',component:['input_number'],min:0,usePair:true},
442442
]
443443
}
444444
}

‎js/m_visualize/Chart.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,11 @@ define([
570570
varfontSize=$(this.wrapSelector('#vp_plFontSize')).val();
571571

572572
code.appendLine('import matplotlib.pyplot as plt');
573-
code.appendFormatLine("plt.rc('figure', figsize=({0}, {1}))",figWidth,figHeight);
573+
code.appendLine('%matplotlib inline');
574574
if(styleName&&styleName.length>0){
575575
code.appendFormatLine("plt.style.use('{0}')",styleName);
576576
}
577+
code.appendFormatLine("plt.rc('figure', figsize=({0}, {1}))",figWidth,figHeight);
577578
code.appendLine();
578579

579580
code.appendLine('from matplotlib import rcParams');

‎js/m_visualize/ChartSetting.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ define([
2929
this.config.dataview=false;
3030

3131
this.state={
32-
figureWidth:12,
33-
figureHeight:8,
32+
figureWidth:'12',
33+
figureHeight:'8',
3434
styleSheet:'',
3535
fontName:'',
36-
fontSize:10,
36+
fontSize:'10',
3737
...this.state
3838
}
3939
}
@@ -124,7 +124,7 @@ define([
124124
generateImportCode(){
125125
varcode=newcom_String();
126126
code.appendLine('import matplotlib.pyplot as plt');
127-
code.append('%matplotlib inline');
127+
code.appendLine('%matplotlib inline');
128128
code.appendLine('import seaborn as sns');
129129
return[code.toString()];
130130
}
@@ -144,10 +144,10 @@ define([
144144
code.appendLine('import matplotlib.pyplot as plt');
145145
code.appendLine('%matplotlib inline');
146146
code.appendLine('import seaborn as sns');
147-
code.appendFormatLine("plt.rc('figure', figsize=({0}, {1}))",figureWidth,figureHeight);
148147
if(styleSheet&&styleSheet.length>0){
149148
code.appendFormatLine("plt.style.use('{0}')",styleSheet);
150149
}
150+
code.appendFormatLine("plt.rc('figure', figsize=({0}, {1}))",figureWidth,figureHeight);
151151
code.appendLine();
152152

153153
code.appendLine('from matplotlib import rcParams');

‎js/m_visualize/Plotly.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,11 @@ define([
549549
// let height = $(this.wrapSelector('#vp_ptPreview')).height();
550550
// console.log(width, height);
551551
etcOptionCode.push(com_util.formatString('width={0}, height={1}',width,height));
552+
553+
// no auto-import for preview
554+
this.config.checkModules=[];
555+
}else{
556+
this.config.checkModules=['px'];
552557
}
553558

554559
letgeneratedCode=com_generator.vp_codeGenerator(this,config,this.state

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp