Skip to content

Commit 78af16a

Browse files
committed
fix occgrid plot to reuse ax
1 parent a614b0e commit 78af16a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

roboticstoolbox/mobile/OccGrid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ def plot(self, map=None, ax=None, block=False, **kwargs):
278278
to control the displayed color of free space and obstacles.
279279
280280
"""
281-
282-
ax = base.axes_logic(ax, 2)
281+
if ax is None:
282+
ax = base.axes_logic(ax, 2)
283283

284284
if map is None:
285285
map = self._grid

roboticstoolbox/mobile/PlannerBase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ def plot_bg(
903903
# overlay obstacles
904904
c_map = mpl.colors.ListedColormap(colors)
905905
# self.occgrid.plot(image, cmap=c_map, zorder=1)
906-
self.occgrid.plot(cmap=c_map, zorder=1)
906+
self.occgrid.plot(cmap=c_map, zorder=1, ax=ax)
907907

908908
ax.set_facecolor((1, 1, 1)) # create white background
909909
ax.set_xlabel("x (cells)")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy