aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation/corr_scatter_plot.py4
-rw-r--r--wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js9
-rw-r--r--wqflask/wqflask/templates/corr_scatterplot.html14
3 files changed, 16 insertions, 11 deletions
diff --git a/wqflask/wqflask/correlation/corr_scatter_plot.py b/wqflask/wqflask/correlation/corr_scatter_plot.py
index e7fe8b91..f8eca386 100644
--- a/wqflask/wqflask/correlation/corr_scatter_plot.py
+++ b/wqflask/wqflask/correlation/corr_scatter_plot.py
@@ -42,7 +42,7 @@ class CorrScatterPlot(object):
if slope < 0.001:
slope_string = '%.3E' % slope
else:
- slope_string = str(slope)
+ slope_string = '%.3f' % slope
x_buffer = (max(vals_1) - min(vals_1))*0.1
y_buffer = (max(vals_2) - min(vals_2))*0.1
@@ -62,7 +62,7 @@ class CorrScatterPlot(object):
if srslope < 0.001:
srslope_string = '%.3E' % srslope
else:
- srslope_string = str(srslope)
+ srslope_string = '%.3f' % srslope
x_buffer = (max(rx) - min(rx))*0.1
y_buffer = (max(ry) - min(ry))*0.1
diff --git a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js
index 8fdbad35..9ab0727c 100644
--- a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js
+++ b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js
@@ -142,7 +142,8 @@ function drawg() {
x: x_values,
y: y_values,
mode: 'markers',
- text: sample_names
+ text: sample_names,
+ hoverinfo: "text+x+y"
}
var trace2 = {
@@ -172,7 +173,8 @@ function srdrawg() {
x: x_values,
y: y_values,
mode: 'markers',
- text: sample_names
+ text: sample_names,
+ hoverinfo: "text+x+y"
}
Plotly.newPlot('srscatterplot2', [trace1], sr_layout)
@@ -361,6 +363,7 @@ function getdata() {
y: y_values,
mode: 'markers',
text: point_text,
+ hoverinfo: "text+x+y",
marker: {
color: 'rgb(66, 66, 245)',
symbol: symbol_list,
@@ -373,6 +376,7 @@ function getdata() {
y: y_values,
mode: 'markers',
text: point_text,
+ hoverinfo: "text+x+y",
marker: {
color: 'rgb(66, 66, 245)',
size: sizes
@@ -578,6 +582,7 @@ function srgetdata() {
y: y_values,
mode: 'markers',
text: point_text,
+ hoverinfo: "text+x+y",
marker: {
color: 'rgb(66, 66, 245)',
symbol: symbol_list,
diff --git a/wqflask/wqflask/templates/corr_scatterplot.html b/wqflask/wqflask/templates/corr_scatterplot.html
index a8d65169..ffc8244d 100644
--- a/wqflask/wqflask/templates/corr_scatterplot.html
+++ b/wqflask/wqflask/templates/corr_scatterplot.html
@@ -126,13 +126,13 @@
</li>
</ul>
- <div class="tab-content">
+ <div class="tab-content" style="min-width: 800px;">
<div class="tab-pane active" id="tp1">
<br>
<div id="scatterplot2"></div>
<br>
- <div class="row" style="width: 70%; overflow: hidden;">
+ <div class="row" style="min-width: 700px; overflow: hidden;">
<div style="float: left;">
<table class="table table-hover table-striped table-bordered" style="width: 80%; margin-left: 60px; text-align: right;">
<thead>
@@ -163,13 +163,13 @@
<td style="text-align: left;" colspan="2">
Regression Line
<br>
- y = {{ jsdata.slope_string }} * x + {{'%0.3f' % jsdata.intercept}}
+ y = {{ jsdata.slope_string }} * x {% if jsdata.intercept < 0 %}- {{'%0.3f' % (jsdata.intercept * -1)}}{% else %}+ {{'%0.3f' % jsdata.intercept}}{% endif %}
</td>
</tr>
</tbody>
</table>
</div>
- <div style="padding-left: 40px; overflow: hidden;">
+ <div style="margin-left: 50px; min-width: 300px; float: left;">
{% if trait_1.dataset.type == "ProbeSet" %}
<div>
X axis:
@@ -247,7 +247,7 @@
<br>
<div id="srscatterplot2"></div>
<br>
- <div class="row" style="width: 70%;">
+ <div class="row" style="min-width: 700px; overflow: hidden;">
<div style="float: left;">
<table class="table table-hover table-striped table-bordered" style="width: 80%; margin-left: 60px; text-align: right;">
<thead>
@@ -278,13 +278,13 @@
<td style="text-align: left;" colspan="2">
Regression Line
<br>
- y = {{ jsdata.srslope_string }} * x + {{'%0.3f' % jsdata.srintercept}}
+ y = {{ jsdata.srslope_string }} * x {% if jsdata.srintercept < 0 %}- {{'%0.3f' % (jsdata.srintercept * -1)}}{% else %}+ {{'%0.3f' % jsdata.srintercept}}{% endif %}
</td>
</tr>
</tbody>
</table>
</div>
- <div style="padding-left: 40px; overflow: hidden;">
+ <div style="margin-left: 50px; min-width: 300px; float: left;">
{% if trait_1.dataset.type == "ProbeSet" %}
<div>
X axis: