Refinements - ensure gca/gcf are gone.

This commit is contained in:
Danny Staple
2022-11-16 22:44:25 +00:00
parent 66a49b4ec3
commit 97018fc119
7 changed files with 15 additions and 11 deletions
@@ -13,6 +13,7 @@ class RobotDisplay:
self.line = ""
self.arena = {}
self.display_closed = False
self.fig, self.ax = plt.subplots()
self.pose_coords = []
self.pose_uv = []
@@ -67,7 +68,6 @@ class RobotDisplay:
async def main(self):
plt.ion()
await self.ble_connection.connect()
self.fig, self.ax = plt.subplots()
try:
await self.send_command("arena")
self.fig.canvas.mpl_connect("close_event", self.handle_close)