diff --git a/plot/scripts/create-venv.sh b/plot/scripts/create-venv.sh index a912fc839..a35252a17 100755 --- a/plot/scripts/create-venv.sh +++ b/plot/scripts/create-venv.sh @@ -21,6 +21,5 @@ fi "${python_bin}" -m venv "${VENV}" source "${VENV}/bin/activate" -"${python_bin}" -m pip install cython -"${python_bin}" -m pip install plotly numpy +"${python_bin}" -m pip install cython plotly deactivate diff --git a/plot/scripts/plotter.py b/plot/scripts/plotter.py index a457d7922..04dcb672c 100644 --- a/plot/scripts/plotter.py +++ b/plot/scripts/plotter.py @@ -2,7 +2,6 @@ import os import json import plotly.graph_objects as go -import numpy as np def remove_key(d, key, empty_subkey=None): @@ -113,7 +112,7 @@ def process_trace(trace): # Flatten 'z' when dealing with 3D scatters. if trace_type == 'scatter3d': - trace["z"] = np.array(trace["z"]).flatten() + trace["z"] = [item for sublist in trace["z"] for item in sublist] return map_trace_type_to_plotly_object(trace_type)(trace)