Use experiment name as figure title

This commit is contained in:
simondlevy
2016-08-23 15:36:40 -04:00
parent 08d1c9d223
commit 6803744d28
2 changed files with 4 additions and 4 deletions

View File

@@ -110,8 +110,8 @@ def main():
# Create a byte array to receive the computed maps
mapbytes = bytearray(MAP_SIZE_PIXELS * MAP_SIZE_PIXELS)
# Set up a SLAM display
display = SlamShow(MAP_SIZE_PIXELS, MAP_SIZE_METERS*1000/MAP_SIZE_PIXELS, 'SLAM')
# Set up a SLAM display, named by dataset
display = SlamShow(MAP_SIZE_PIXELS, MAP_SIZE_METERS*1000/MAP_SIZE_PIXELS, dataset)
# Pose will be modified in our threaded code
pose = [0,0,0]

View File

@@ -53,12 +53,11 @@ import numpy as np
class SlamShow(object):
def __init__(self, map_size_pixels, map_scale_mm_per_pixel, window_name):
def __init__(self, map_size_pixels, map_scale_mm_per_pixel, title):
# Store constants for update
self.map_size_pixels = map_size_pixels
self.map_scale_mm_per_pixel = map_scale_mm_per_pixel
self.window_name = window_name
# Create a byte array to display the map with a color overlay
self.bgrbytes = bytearray(map_size_pixels * map_size_pixels * 3)
@@ -70,6 +69,7 @@ class SlamShow(object):
self.figid = id(fig)
fig.canvas.set_window_title('SLAM')
plt.title(title)
self.ax = fig.gca()
self.ax.set_aspect("auto")