def _set_axis_properties(self, axis):
def _get(param):<EOL><INDENT>return getattr(self.ax, '<STR_LIT>'.format(axis, param))()<EOL><DEDENT>def _set(param, *args, **kwargs):<EOL><INDENT>return getattr(self.ax, '<STR_LIT>'.format(axis, param))(<EOL>*args, **kwargs)<EOL><DEDENT>scale = getattr(self.args, '<STR_LIT>'.format(axis))<EOL>label = getattr(self.args, '<STR_LIT>'.format(axis))<EOL>min_ = getattr(self.args, '<STR_LIT>'.format(axis))<EOL>max_ = getattr(self.args, '<STR_LIT>'.format(axis))<EOL>if scale == '<STR_LIT>' and (<EOL>min_ is not None and<EOL>max_ is not None and<EOL>max_ < <NUM_LIT>):<EOL><INDENT>limits = (min_, min_ + max_)<EOL><DEDENT>else:<EOL><INDENT>limits = (min_, max_)<EOL><DEDENT>if limits[<NUM_LIT:0>] is not None or limits[<NUM_LIT:1>] is not None:<EOL><INDENT>_set('<STR_LIT>', *limits)<EOL><DEDENT>if scale:<EOL><INDENT>_set('<STR_LIT>', scale)<EOL><DEDENT>if _get('<STR_LIT>') in GPS_SCALES:<EOL><INDENT>_set('<STR_LIT>', scale, epoch=self.args.epoch)<EOL><DEDENT>if label is None:<EOL><INDENT>label = getattr(self, '<STR_LIT>'.format(axis))()<EOL><DEDENT>if label:<EOL><INDENT>if self.usetex:<EOL><INDENT>label = label_to_latex(label)<EOL><DEDENT>_set('<STR_LIT:label>', label)<EOL><DEDENT>limits = _get('<STR_LIT>')<EOL>scale = _get('<STR_LIT>')<EOL>label = _get('<STR_LIT:label>')<EOL>self.log(<NUM_LIT:2>, '<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>axis.upper(), scale, limits))<EOL>self.log(<NUM_LIT:3>, ('<STR_LIT>'.format(axis.upper(), label)))<EOL>
Generic method to set properties for X/Y axis