Thanks Gary, as usual. For anyone else coming down this path, the following mod changes the text at the top for large images from this:
http://sinkingsensation.com/dropbox/daywind-orig.png To this: http://sinkingsensation.com/dropbox/daywind-fixed.png To lower the main top label open genplot.py and search for: # because each label may be in a different color. For now, append them together to get # the total width top_label = ' '.join([line.label for line in self.line_list]) top_label_size = draw.textsize(top_label, font=top_label_font) x = (self.image_width - top_label_size[0])/2 y = 0 And change to: # because each label may be in a different color. For now, append them together to get # the total width top_label = ' '.join([line.label for line in self.line_list]) top_label_size = draw.textsize(top_label, font=top_label_font) x = (self.image_width - top_label_size[0])/2 y = 5 (Adjust that y position to taste). To lower the unit at top left corner, open genplot.py and search for: # Put the units in the upper left corner unit_label_font = weeplot.utilities.get_font_handle(self.unit_label_font_path, self.unit_label_font_size) if self.unit_label: draw.text(self.unit_label_position, self.unit_label, fill=self.unit_label_font_color, font=unit_label_font) And change to: # Put the units in the upper left corner unit_label_font = weeplot.utilities.get_font_handle(self.unit_label_font_path, self.unit_label_font_size) if self.unit_label: # routine to lower the label a bit x = self.unit_label_position[0] y = self.unit_label_position[1] + 5 # adding an offset here (modify to taste) draw.text( (x, y), self.unit_label, fill=self.unit_label_font_color, font=unit_label_font) On Monday, February 27, 2017 at 1:08:04 AM UTC-8, gjr80 wrote: > > Hi, > > I think you will find it is hard coded as a proportion of the font size > being used. Line 81 looks like a good place to start: > > self.tmargin = int(1.5 * self.top_label_font_size + 0.5) > > Gary > > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
