diff --git a/examples/biorbd/live_model.py b/examples/biorbd/live_model.py index c55f783..063d4b1 100644 --- a/examples/biorbd/live_model.py +++ b/examples/biorbd/live_model.py @@ -3,6 +3,8 @@ The user can interact with the model by changing the joint angles using sliders. """ +from fontTools.feaLib import variableScalar + from pyorerun import LiveModelAnimation from pyorerun import BiorbdModel diff --git a/pyorerun/model_interfaces/pinocchio_model_interface.py b/pyorerun/model_interfaces/pinocchio_model_interface.py index 3b8bf37..1c07059 100644 --- a/pyorerun/model_interfaces/pinocchio_model_interface.py +++ b/pyorerun/model_interfaces/pinocchio_model_interface.py @@ -384,7 +384,6 @@ def muscle_strips(self, q: np.ndarray) -> list[list[np.ndarray]]: f_name for f_name in self._frame_list_names if muscle_name == f_name.split("-")[0] ] # assume muscle frames are named like "muscleName-1", "muscleName-2", etc. muscle_strip = [] - print(f"Muscle {muscle_name} frames: {muscle_frames}") for i in range(len(muscle_frames)): f1_id = self.model.getFrameId(muscle_frames[i]) frame_location = self.data.oMf[f1_id].translation diff --git a/pyorerun/pyoemg.py b/pyorerun/pyoemg.py index 40bea6a..783e76f 100644 --- a/pyorerun/pyoemg.py +++ b/pyorerun/pyoemg.py @@ -5,7 +5,7 @@ from typing import Optional, List import numpy as np -from matplotlib.cm import get_cmap +from matplotlib import colormaps from matplotlib.colors import ListedColormap @@ -20,7 +20,7 @@ def __init__( time: Optional[np.ndarray] = None, muscle_names: Optional[List[str]] = None, mvc: Optional[np.ndarray] = None, - colormap: Optional[ListedColormap] | str = get_cmap("magma"), + colormap: Optional[ListedColormap] | str = colormaps["magma"], attrs: Optional[dict] = None, ): """ @@ -37,7 +37,7 @@ def __init__( Names/labels of the emg/muscles mvc : np.ndarray The maximal voluntary contraction values for each muscle. If None, the default is the maximal value across all frames for each muscle independently. - colormap: matplotlib.cm.get_cmap() instance, optional + colormap: matplotlib Colormap instance or str, optional The colormap to use when displaying the emg data. If None, the default is "magma". attrs : dict Metadata attributes (e.g., units) @@ -100,9 +100,9 @@ def initialize_colormap(colormap: Optional[ListedColormap | str] = None) -> List """Check that the colormap provided is correct""" if colormap is not None: if isinstance(colormap, str): - colormap = get_cmap(colormap) + colormap = colormaps[colormap] if not isinstance(colormap, ListedColormap): - raise TypeError("colormap must be a matplotlib.cm.get_cmap instance or the name of the colormap (str).") + raise TypeError("colormap must be a matplotlib Colormap instance or the name of the colormap (str).") return colormap def check_dimensions(self): diff --git a/pyproject.toml b/pyproject.toml index 42d5e21..ecbb725 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ "Operating System :: OS Independent", ] dependencies = [ - "ezc3d", # Now needed, but imported for our custom PyoMarkers.from_c3d() + # "ezc3d", # Now needed, but imported for our custom PyoMarkers.from_c3d() "numpy", "rerun-sdk==0.30.2", "trimesh",