From 6839f0e716f7dd39b03596bfbe192658cac8391c Mon Sep 17 00:00:00 2001 From: keisuke-umezawa Date: Wed, 12 Oct 2022 23:32:39 +0900 Subject: [PATCH 1/4] Align graph slice --- optuna_dashboard/ts/components/GraphSlice.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/optuna_dashboard/ts/components/GraphSlice.tsx b/optuna_dashboard/ts/components/GraphSlice.tsx index d03dacf1..1cddddab 100644 --- a/optuna_dashboard/ts/components/GraphSlice.tsx +++ b/optuna_dashboard/ts/components/GraphSlice.tsx @@ -187,6 +187,10 @@ const plotSlice = ( return t.params.find((p) => p.name == selected)!.value }) + const trialNumbers: number[] = filteredTrials.map( + (t) => t.number as number + ) + const isnum = valueStrings.every((v) => { return !isNaN(Number(v)) }) @@ -198,6 +202,13 @@ const plotSlice = ( x: valuesNum, y: objectiveValues, mode: "markers", + marker: { + color: trialNumbers, + colorscale: 'Blues', + colorbar: { + title: "Trial", + }, + }, }, ] layout["xaxis"] = { From d453cfac06ab4c1469ee05b630bbe7059d94eed4 Mon Sep 17 00:00:00 2001 From: keisuke-umezawa Date: Thu, 13 Oct 2022 11:49:18 +0900 Subject: [PATCH 2/4] Reverse colorscale --- optuna_dashboard/ts/components/GraphSlice.tsx | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/optuna_dashboard/ts/components/GraphSlice.tsx b/optuna_dashboard/ts/components/GraphSlice.tsx index 1cddddab..7386ee94 100644 --- a/optuna_dashboard/ts/components/GraphSlice.tsx +++ b/optuna_dashboard/ts/components/GraphSlice.tsx @@ -162,7 +162,7 @@ const plotSlice = ( automargin: true, }, yaxis: { - title: "Objective Values", + title: "Objective Value", type: logYScale ? "log" : "linear", gridwidth: 1, automargin: true, @@ -205,10 +205,15 @@ const plotSlice = ( marker: { color: trialNumbers, colorscale: 'Blues', + reversescale: true, colorbar: { title: "Trial", }, - }, + line: { + color: "Grey", + width: 0.5, + }, + }, }, ] layout["xaxis"] = { @@ -231,6 +236,18 @@ const plotSlice = ( x: valuesCategorical, y: objectiveValues, mode: "markers", + marker: { + color: trialNumbers, + colorscale: 'Blues', + reversescale: true, + colorbar: { + title: "Trial", + }, + line: { + color: "Grey", + width: 0.5, + }, + }, }, ] layout["xaxis"] = { From be4928256bbfd9c4e2b5d4f0b3d8155ba854d33b Mon Sep 17 00:00:00 2001 From: keisuke-umezawa Date: Sat, 15 Oct 2022 17:27:47 +0900 Subject: [PATCH 3/4] Fix lint --- optuna_dashboard/ts/components/GraphSlice.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/optuna_dashboard/ts/components/GraphSlice.tsx b/optuna_dashboard/ts/components/GraphSlice.tsx index 7386ee94..39082eb4 100644 --- a/optuna_dashboard/ts/components/GraphSlice.tsx +++ b/optuna_dashboard/ts/components/GraphSlice.tsx @@ -187,9 +187,7 @@ const plotSlice = ( return t.params.find((p) => p.name == selected)!.value }) - const trialNumbers: number[] = filteredTrials.map( - (t) => t.number as number - ) + const trialNumbers: number[] = filteredTrials.map((t) => t.number as number) const isnum = valueStrings.every((v) => { return !isNaN(Number(v)) @@ -204,7 +202,7 @@ const plotSlice = ( mode: "markers", marker: { color: trialNumbers, - colorscale: 'Blues', + colorscale: "Blues", reversescale: true, colorbar: { title: "Trial", @@ -238,7 +236,7 @@ const plotSlice = ( mode: "markers", marker: { color: trialNumbers, - colorscale: 'Blues', + colorscale: "Blues", reversescale: true, colorbar: { title: "Trial", From d0b43ab02c8587814c05a2ab71f2088171eb7349 Mon Sep 17 00:00:00 2001 From: keisuke umezawa Date: Thu, 20 Oct 2022 18:35:16 +0900 Subject: [PATCH 4/4] Update optuna_dashboard/ts/components/GraphSlice.tsx Co-authored-by: Masashi Shibata --- optuna_dashboard/ts/components/GraphSlice.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optuna_dashboard/ts/components/GraphSlice.tsx b/optuna_dashboard/ts/components/GraphSlice.tsx index 39082eb4..609e8aab 100644 --- a/optuna_dashboard/ts/components/GraphSlice.tsx +++ b/optuna_dashboard/ts/components/GraphSlice.tsx @@ -187,7 +187,7 @@ const plotSlice = ( return t.params.find((p) => p.name == selected)!.value }) - const trialNumbers: number[] = filteredTrials.map((t) => t.number as number) + const trialNumbers: number[] = filteredTrials.map((t) => t.number) const isnum = valueStrings.every((v) => { return !isNaN(Number(v))