Download third_party/poselib/visualization/tests/test_plotter.py from Tinghong-Ye22/code-GMR: direct link, hf CLI and curl.
- Browser
- Download file 586 Bytes
-
https://huggingface.co/Tinghong-Ye22/code-GMR/resolve/main/third_party/poselib/visualization/tests/test_plotter.py
- Command line
-
hf download hf://Tinghong-Ye22/code-GMR/third_party/poselib/visualization/tests/test_plotter.py
-
curl -L -o test_plotter.py https://huggingface.co/Tinghong-Ye22/code-GMR/resolve/main/third_party/poselib/visualization/tests/test_plotter.py
586 Bytes
| from typing import cast | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from ..core import BasePlotterTask, BasePlotterTasks | |
| from ..plt_plotter import Matplotlib3DPlotter | |
| from ..simple_plotter_tasks import Draw3DDots, Draw3DLines | |
| task = Draw3DLines(task_name="test", | |
| lines=np.array([[[0, 0, 0], [0, 0, 1]], [[0, 1, 1], [0, 1, 0]]]), color="blue") | |
| task2 = Draw3DDots(task_name="test2", | |
| dots=np.array([[0, 0, 0], [0, 0, 1], [0, 1, 1], [0, 1, 0]]), color="red") | |
| task3 = BasePlotterTasks([task, task2]) | |
| plotter = Matplotlib3DPlotter(cast(BasePlotterTask, task3)) | |
| plt.show() | |