]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/commitdiff
Fix plotting nodes
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 6 Jan 2021 13:52:56 +0000 (14:52 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 6 Jan 2021 13:52:56 +0000 (14:52 +0100)
scripts/plot_json_objects_scenario.py

index 2b59beba5abad97fe8fab96b72a485911d815502..651cb8d73988720941d33945c4b70601c48cbe6f 100644 (file)
@@ -177,8 +177,8 @@ if __name__ == "__main__":
     # Plot all the nodes (if exists), obstacles, and slot.
     if "nodes_x" in scenario and "nodes_y" in scenario:
         plt.plot(
-            scenario["nodes_x"] - MINX,
-            scenario["nodes_y"] - MINY,
+            [x - MINX for x in scenario["nodes_x"]],
+            [y - MINY for y in scenario["nodes_y"]],
             color="lightgray",
             marker="o",
             ms=2,