Set the tick distance.
508236
def ydtick(self, dtick, index=1):
        """"""
        self.layout['yaxis' + str(index)]['dtick'] = dtick
        return self
967007
public void setRange( int dimension , double min , double max ) {
		valueMin[dimension] = min;
		valueMax[dimension] = max;
	}
843044
def _maketicks(self, ax, units='THz'):
        """"""
        # set y-ticks
        ax.yaxis.set_major_locator(MaxNLocator(6))
        ax.yaxis.set_minor_locator(AutoMinorLocator(2))
        ax.xaxis.set_minor_locator(AutoMinorLocator(2))

        # set x-ticks; only plot the unique tick labels
        ticks = self.get_ticks()
        unique_d = []
        unique_l = []
        if ticks['distance']:
            temp_ticks = list(zip(ticks['distance'], ticks['label']))
            unique_d.append(temp_ticks[0][0])
            unique_l.append(temp_ticks[0][1])
            for i in range(1, len(temp_ticks)):
                if unique_l[-1] != temp_ticks[i][1]:
                    unique_d.append(temp_ticks[i][0])
                    unique_l.append(temp_ticks[i][1])

        logging.info('\nLabel positions:')
        for dist, label in list(zip(unique_d, unique_l)):
            logging.info('\t{:.4f}: {}'.format(dist, label))

        ax.set_xticks(unique_d)
        ax.set_xticklabels(unique_l)
        ax.xaxis.grid(True, ls='-')

        trans_xdata_yaxes = blended_transform_factory(ax.transData,
                                                      ax.transAxes)
        ax.vlines(unique_d, 0, 1,
                  transform=trans_xdata_yaxes,
                  colors=rcParams['grid.color'],
                  linewidth=rcParams['grid.linewidth'])

        # Use a text hyphen instead of a minus sign because some nice fonts
        # like Whitney don't come with a real minus
        labels = {'thz': 'THz', 'cm-1': r'cm$^{\mathrm{-}\mathregular{1}}$',
                  'ev': 'eV', 'mev': 'meV'}
        ax.set_ylabel('Frequency ({0})'.format(labels[units.lower()]))
748799
def tickmark(self, x, y, size=10, orientation=90):
        """"""

        (x1, y1) = self.p2c([x, y])
        x2 = x1 + size * math.cos(math.radians(orientation))
        y2 = y1 - size * math.sin(math.radians(orientation))
        self.create_line(x1, y1, x2, y2)
1345025
def set_offset( self, offset ):
        """"""
        assert offset in range( len( self.buffer ) )
        self.pos = offset
        self._fill_buffer()
1058134
def set_yticks(start, step, axes="gca"):
    
    if axes=="gca": axes = _pylab.gca()

    # first get one of the tick label locations
    xposition = axes.yaxis.get_ticklabels()[0].get_position()[0]

    # get the bounds
    ymin, ymax = axes.get_ylim()

    # get the starting tick
    nstart = int(_pylab.floor((ymin-start)/step))
    nstop  = int(_pylab.ceil((ymax-start)/step))
    ticks = []
    for n in range(nstart,nstop+1): ticks.append(start+n*step)

    axes.set_yticks(ticks)

    # set the x-position
    for t in axes.yaxis.get_ticklabels():
        x, y = t.get_position()
        t.set_position((xposition, y))

    _pylab.draw()
1102032
public function tick() {
        if ((microtime(true) - self::$lastTick) > self::$tickFreq) {
            self::$lastTick = microtime(true);
            $this->fire('tick');
        }
    }
354123
def set_range_y(self,val):
        
        d = self.declaration
        if d.auto_range[1]:
            return
        self.widget.setYRange(*val,padding=0)
499114
def set_user_timer(self, value, index):
        """"""

        err = self.clock_manager.set_tick(index, value)
        return [err]
429516
function(x1,y1,x2,y2){
		this.setRange(x1,y1,x2,y2);
		this.prepaint();
	}
1277082
private void tick(long tickIntervalMs) {
        for (int i = 0; i < NUM_AVERAGES; ++i) {
            stat[i].tick(tickIntervalMs);
        }
    }
464599
def _maketicks(self, ax, ylabel='Energy (eV)'):
        """"""
        # set y-ticks
        ax.yaxis.set_major_locator(MaxNLocator(6))
        ax.yaxis.set_minor_locator(AutoMinorLocator(2))

        # set x-ticks; only plot the unique tick labels
        ticks = self.get_ticks()
        unique_d = []
        unique_l = []
        if ticks['distance']:
            temp_ticks = list(zip(ticks['distance'], ticks['label']))
            unique_d.append(temp_ticks[0][0])
            unique_l.append(temp_ticks[0][1])
            for i in range(1, len(temp_ticks)):
                # Hide labels marked with @
                if '@' in temp_ticks[i][1]:
                    # If a branch connection, check all parts of label
                    if r'$\mid$' in temp_ticks[i][1]:
                        label_components = temp_ticks[i][1].split(r'$\mid$')
                        good_labels = [l for l in label_components
                                       if l[0] != '@']
                        if len(good_labels) == 0:
                            continue
                        else:
                            temp_ticks[i] = (temp_ticks[i][0],
                                             r'$\mid$'.join(good_labels))
                    # If a single label, check first character
                    elif temp_ticks[i][1][0] == '@':
                        continue

                # Append label to sequence if it is not same as predecessor
                if unique_l[-1] != temp_ticks[i][1]:
                    unique_d.append(temp_ticks[i][0])
                    unique_l.append(temp_ticks[i][1])

        logging.info('Label positions:')
        for dist, label in list(zip(unique_d, unique_l)):
            logging.info('\t{:.4f}: {}'.format(dist, label))

        ax.set_xticks(unique_d)
        ax.set_xticklabels(unique_l)
        ax.xaxis.grid(True, ls='-')
        ax.set_ylabel(ylabel)

        trans_xdata_yaxes = blended_transform_factory(ax.transData,
                                                      ax.transAxes)
        ax.vlines(unique_d, 0, 1,
                  transform=trans_xdata_yaxes,
                  colors=rcParams['grid.color'],
                  linewidth=rcParams['grid.linewidth'],
                  zorder=3)
550827
def tick(self):
        """"""
        now = datetime.datetime.now()
        self.add(now)

        # Create a list of timestamps, one for each period and
        # representing the beginning of that period (i.e. since now.)
        tstamps = [now - datetime.timedelta(seconds=xx)
                   for xx in self._periods]

        # Trim off any tick values older than the earliest timestamp.
        self.removeLT(min(tstamps))

        # Create a list of counts, one for each period and
        # representing the number of ticks in that period.
        counts = [self.getCountGT(xx) for xx in tstamps]

        # Compute a list of rates for the periods.
        rates = [float(xx)/yy for xx, yy in zip(counts, self._periods)]

        # Return the rates as a tuple.
        return tuple(rates)
866166
def set_position(self, position):
        """"""
        if position < 0:
            position += len(self.checkdefs)
        while position >= len(self.checkdefs):
            self.checkdefs.append(([], []))
        self.position = position
491968
def set_fraction(self, value):
        """"""
        if value < 0:
            value *= -1
        value = min(value, 1)
        if self.horizontal:
            width = int(self.width * value)
            height = self.height
        else:
            width = self.width
            height = int(self.height * value)
        self.canvas.coords(self.meter, self.xpos, self.ypos,
                           self.xpos + width, self.ypos + height)
1289116
def set_xlim_cb(self, redraw=True):
        """"""
        try:
            xmin = float(self.w.x_lo.get_text())
        except Exception:
            set_min = True
        else:
            set_min = False

        try:
            xmax = float(self.w.x_hi.get_text())
        except Exception:
            set_max = True
        else:
            set_max = False

        if set_min or set_max:
            self.tab_plot.draw()
            self.set_xlimits_widgets(set_min=set_min, set_max=set_max)

        if not (set_min and set_max):
            self.tab_plot.ax.set_xlim(xmin, xmax)
            if redraw:
                self.tab_plot.draw()
1247785
def calculate_y_ticks(self, plot_height):
        """"""

        calibrated_data_min = self.calibrated_data_min
        calibrated_data_max = self.calibrated_data_max
        calibrated_data_range = calibrated_data_max - calibrated_data_min

        ticker = self.y_ticker
        y_ticks = list()
        for tick_value, tick_label in zip(ticker.values, ticker.labels):
            if calibrated_data_range != 0.0:
                y_tick = plot_height - plot_height * (tick_value - calibrated_data_min) / calibrated_data_range
            else:
                y_tick = plot_height - plot_height * 0.5
            if y_tick >= 0 and y_tick <= plot_height:
                y_ticks.append((y_tick, tick_label))

        return y_ticks