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

Commit8ab4d5e

Browse files
author
minjk-bl
committed
Add show values precision option on Seaborn app
1 parent08321ae commit8ab4d5e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

‎html/m_visualize/seaborn.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
</div>
117117
<divclass="vp-grid-box sb-option">
118118
<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"/>
119120
</div>
120121
</div>
121122
<labelfor="userOption"class="vp-bold">User Option</label>

‎js/m_visualize/Seaborn.js‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ define([
4949
kde:'',
5050
stat:'',
5151
showValues:false,
52+
showValuesPrecision:'',
5253
// axes options
5354
x_limit_from:'',
5455
x_limit_to:'',
@@ -705,7 +706,8 @@ define([
705706

706707
generateCode(preview=false){
707708
let{
708-
chartType, data, x, y, setXY, hue, kde, stat, showValues, userOption='',
709+
chartType, data, x, y, setXY, hue, kde, stat, showValues, showValuesPrecision,
710+
userOption='',
709711
x_limit_from, x_limit_to, y_limit_from, y_limit_to,
710712
xticks, xticks_label, xticks_rotate, removeXticks,
711713
yticks, yticks_label, yticks_rotate, removeYticks,
@@ -851,7 +853,11 @@ define([
851853

852854
if(showValues&&showValues===true){
853855
code.appendLine('ax = '+generatedCode);
854-
code.appendLine("vp_seaborn_show_values(ax)");
856+
code.append("vp_seaborn_show_values(ax");
857+
if(showValuesPrecision!==''){
858+
code.appendFormat(", precision={0}",showValuesPrecision);
859+
}
860+
code.appendLine(")");
855861
}else{
856862
code.appendLine(generatedCode);
857863
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp