diff --git a/telemetry/code/monitor/graph_plotter_rewrite.py b/telemetry/code/monitor/graph_plotter_rewrite.py index 45a378f..55f9c41 100755 --- a/telemetry/code/monitor/graph_plotter_rewrite.py +++ b/telemetry/code/monitor/graph_plotter_rewrite.py @@ -45,7 +45,7 @@ class Plot(pyglet.window.Window): pyglet.window.Window.__init__(self, resizable=True) self.series = series self.font = 'Arkhip' - self.margins = (0.1, 0.08) # Fractions of window size + self.margins = (0.09, 0.08) # Fractions of window size self.lines = (10, 8) #self.resizable = True self.set_caption(self.series.title) @@ -88,30 +88,30 @@ class Plot(pyglet.window.Window): if axis==0: # x axis, vertical lines scale = float(self.series.xlimits[1]-self.series.xlimits[0])/(stop-start) tagvalue = ((pos-start) * scale) + self.series.xlimits[0] - tagtext = str(round(tagvalue, 1)) + tagtext = str(int(tagvalue)) pyglet.graphics.draw(2, pyglet.gl.GL_LINES, ('v2i', (pos, limita, pos, limitb)), ('c3B', (0, 0, 0, 0, 0, 0))) tag = pyglet.text.Label(tagtext, color=BLACK, - font_name=self.font, font_size=self.height*self.margins[1-axis]*0.28, - x=pos, y=self.height*self.margins[1-axis], + font_name=self.font, font_size=self.height*self.margins[1]*0.3, + x=pos, y=self.height*self.margins[1], anchor_x='left', anchor_y='top') axistitle = pyglet.text.Label(self.series.xname, color=BLACK, - font_name=self.font, font_size=self.height*self.margins[axis]*0.3, + font_name=self.font, font_size=self.height*self.margins[1]*0.3, x=self.width/2, y=0, anchor_x='center', anchor_y='bottom') axistitle.draw() if axis==1: # y axis, horizontal lines scale = float(self.series.ylimits[1]-self.series.ylimits[0])/(stop-start) tagvalue = ((pos-start) * scale) + self.series.ylimits[0] - tagtext = str(round(tagvalue, 1)) + tagtext = str(int(tagvalue)) pyglet.graphics.draw(2, pyglet.gl.GL_LINES, ('v2i', (limita, pos, limitb, pos)), ('c3B', (0, 0, 0, 0, 0, 0))) tag = pyglet.text.Label(tagtext, color=BLACK, - font_name=self.font, font_size=self.width*self.margins[axis]*0.22, - x=self.width*self.margins[1-axis]*0.9, y=pos, + font_name=self.font, font_size=self.width*self.margins[0]*0.2, + x=self.width*self.margins[0]*0.9, y=pos, anchor_x='right', anchor_y='center') axistitle = pyglet.text.Label(self.series.yname, color=BLACK, - font_name=self.font, font_size=self.height*self.margins[axis]*0.3, + font_name=self.font, font_size=self.height*self.margins[0]*0.3, x=0, y=self.height/2, anchor_x='center', anchor_y='top') pyglet.gl.glPushMatrix() # Set up a new context to avoid confusing the main one -- libgit2 0.21.2