fixed scale colors

parent 844e5f5f5a
commit c6665cb06b
  1. 7
      js/tsne_vis.js

@ -199,6 +199,7 @@ function ReSort(flagInitialize) {
} else { } else {
labelsTarget = uniqueTarget labelsTarget = uniqueTarget
} }
if(flagInitialize) { if(flagInitialize) {
var optionMetricOver = document.getElementById("param-SortMOver-view").value; // Get the threshold value with which the user set's the boundaries of the schema investigation var optionMetricOver = document.getElementById("param-SortMOver-view").value; // Get the threshold value with which the user set's the boundaries of the schema investigation
$('#param-SortM-view').val(optionMetricOver).change(); $('#param-SortM-view').val(optionMetricOver).change();
@ -979,6 +980,8 @@ if (optionMetric == 1) {
type: 'heatmap', type: 'heatmap',
hoverinfo:"z", hoverinfo:"z",
colorscale: colorscaleValue, colorscale: colorscaleValue,
zmin:0,
zmax:1,
colorbar: { colorbar: {
title: 'Normalized Metrics Performance', title: 'Normalized Metrics Performance',
tickvals:[0,0.2,0.4,0.6,0.8,1], tickvals:[0,0.2,0.4,0.6,0.8,1],
@ -988,12 +991,15 @@ if (optionMetric == 1) {
yaxis: 'y'+parseInt(k+1), yaxis: 'y'+parseInt(k+1),
}) })
} else { } else {
console.log(metrics[order[checkCounterMetr]])
traces.push({ traces.push({
y: [], y: [],
x: xValues, x: xValues,
z: [metrics[order[checkCounterMetr]]], z: [metrics[order[checkCounterMetr]]],
hoverinfo:"z", hoverinfo:"z",
type: 'heatmap', type: 'heatmap',
zmin:0,
zmax:1,
colorscale: colorscaleValue, colorscale: colorscaleValue,
showscale: false, showscale: false,
xaxis: 'x'+parseInt(k+1), xaxis: 'x'+parseInt(k+1),
@ -1020,7 +1026,6 @@ if (optionMetric == 1) {
const aux_X = result.Xax.filter((item, index) => target_names[index] == uniqueTarget[i]); const aux_X = result.Xax.filter((item, index) => target_names[index] == uniqueTarget[i]);
const aux_Y = result.Yax.filter((item, index) => target_names[index] == uniqueTarget[i]); const aux_Y = result.Yax.filter((item, index) => target_names[index] == uniqueTarget[i]);
Text = aux_X.map(() => { Text = aux_X.map(() => {
let popup = 'Perplexity: '+parameters[order[checkCounter]][0]+'; Learning rate: '+parameters[order[checkCounter]][1]+'; Max iterations: '+parameters[order[checkCounter]][2]; let popup = 'Perplexity: '+parameters[order[checkCounter]][0]+'; Learning rate: '+parameters[order[checkCounter]][1]+'; Max iterations: '+parameters[order[checkCounter]][2];
return popup; return popup;

Loading…
Cancel
Save