From be04aa2a6f9373ac429d7e22f7998d432bf2d891 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Mon, 20 Jan 2025 10:24:57 -0500 Subject: [PATCH] feat(ScatterPlot): force axes to show in 2D mode --- src/nrtk_explorer/app/embeddings.py | 1 - vue-components/src/components/ScatterPlot.vue | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nrtk_explorer/app/embeddings.py b/src/nrtk_explorer/app/embeddings.py index c761e5f7..4223e1a8 100644 --- a/src/nrtk_explorer/app/embeddings.py +++ b/src/nrtk_explorer/app/embeddings.py @@ -5,7 +5,6 @@ from nrtk_explorer.library import embeddings_extractor from nrtk_explorer.library import dimension_reducers from nrtk_explorer.library.dataset import get_dataset -from nrtk_explorer.library.scoring import partition from nrtk_explorer.app.applet import Applet from nrtk_explorer.app.images.image_ids import ( diff --git a/vue-components/src/components/ScatterPlot.vue b/vue-components/src/components/ScatterPlot.vue index 0e73f702..678a15aa 100644 --- a/vue-components/src/components/ScatterPlot.vue +++ b/vue-components/src/components/ScatterPlot.vue @@ -125,6 +125,9 @@ onMounted(() => { scatterPlot = new ScatterGL(plotContainer.value, { rotateOnStart: false, selectEnabled: true, + styles: { + axesVisible: true + }, pointColorer(i) { const id = indexToId(i) const isTrans = isTransformed(i) @@ -165,6 +168,8 @@ onMounted(() => { } }) scatterPlotRef.value = scatterPlot + // @ts-expect-error: force axes in 2D mode + scatterPlot.scatterPlot.add3dAxes() const cameraControls = ((scatterPlot as any).scatterPlot as any).orbitCameraControls cameraControls.addEventListener('start', emitCameraPosition)