|
1 |
| -from helper import get_x_and_y_from_store |
2 |
| -from helper import get_x_and_y_from_path |
3 |
| -from mpl_toolkits import mplot3d |
| 1 | +from helper import get_x_and_y_from_itr |
4 | 2 |
|
5 | 3 | import matplotlib.pyplot as plt
|
6 | 4 | import matplotlib.cm as cm
|
@@ -35,14 +33,14 @@ def view_map(map_data, stores=None, paths=None, points=None, grid=True):
|
35 | 33 | if stores:
|
36 | 34 | colors = cm.autumn(np.linspace(0, 1, len(stores)))
|
37 | 35 | for c, store in zip(colors, stores):
|
38 |
| - x, y = get_x_and_y_from_store(store) |
| 36 | + x, y = get_x_and_y_from_itr(store) |
39 | 37 | plt.scatter(x, y, color=c)
|
40 | 38 |
|
41 | 39 | if paths:
|
42 | 40 | colors = cm.winter(np.linspace(0, 1, len(paths)))
|
43 | 41 | for c, path in zip(colors, paths):
|
44 | 42 | start, end = path[0], path[-1]
|
45 |
| - x, y = get_x_and_y_from_path(path) |
| 43 | + x, y = get_x_and_y_from_itr(path) |
46 | 44 | plt.scatter(x, y, color=c)
|
47 | 45 | plt.plot(start.x, start.y, marker='x')
|
48 | 46 | plt.plot(end.x, end.y, marker='x')
|
@@ -73,13 +71,13 @@ def view_path(map_data, path, store=None, grid=True, markers=False):
|
73 | 71 | """
|
74 | 72 | # plot all the points in the store
|
75 | 73 | if store:
|
76 |
| - x, y = get_x_and_y_from_store(store) |
| 74 | + x, y = get_x_and_y_from_itr(store) |
77 | 75 | plt.scatter(x, y, color='orange')
|
78 | 76 | # plot all the points in the path
|
79 | 77 | if path:
|
80 | 78 | start = path[0]
|
81 | 79 | end = path[-1]
|
82 |
| - x, y = get_x_and_y_from_path(path) |
| 80 | + x, y = get_x_and_y_from_itr(path) |
83 | 81 | plt.plot(x, y, color='blue')
|
84 | 82 | if markers:
|
85 | 83 | plt.scatter(x, y, color='green')
|
|
0 commit comments