예제 #1
0
파일: axis.py 프로젝트: jtomase/matplotlib
    def set_ticks(self, ticks, minor=False):
        """
        Set the locations of the tick marks from sequence ticks

        ACCEPTS: sequence of floats
        """
        ### XXX if the user changes units, the information will be lost here
        ticks = self.convert_units(ticks)
        self.get_view_interval().update(ticks,0)
        if minor:
            self.set_minor_locator(FixedLocator(ticks))
            return self.get_minor_ticks()
        else:
            self.set_major_locator( FixedLocator(ticks) )
            return self.get_major_ticks()
예제 #2
0
    def set_ticks(self, ticks):
        """
Set the locations of the tick marks from sequence ticks

ACCEPTS: sequence of floats"""
        self.set_major_locator(FixedLocator(ticks))

        self.get_view_interval().update(ticks, 0)
        return self.get_major_ticks()
예제 #3
0
    def set_ticks(self, ticks):
        'Set the locations of the tick marks from sequence ticks'
        self.set_major_locator(FixedLocator(ticks))

        self.get_view_interval().update(ticks, 0)
        return self.get_major_ticks()