Set the Y range on the histogram plot. This disables auto-scaling.
332218
def setHistogramRange(self, mn, mx, padding=0.1):
        """"""
        self.vb.enableAutoRange(self.vb.YAxis, False)
        self.vb.setYRange(mn, mx, padding)
166265
public void setSliderPosition(int y) {

        if (y < 0) {
            y = 0;
        }
        if (y > 256) {
            y = 256;
        }
        m_slider.getElement().getStyle().setTop(y - 1047, Unit.PX);
    }
1096586
def scroll_y(self, pixels, relative=True):
        '''
        
        '''
        if relative:
            self.offset.y += int(pixels)
        else:
            self.offset.y = int(pixels)
        self._update()
1091898
def Y_tighter(self):
        """"""
        self.parent.value('y_distance', self.parent.value('y_distance') / 1.4)
        self.parent.traces.display()
763211
def true_range(arg, high_col='high', low_col='low', close_col='close', skipna=0):
    
    _ensure_col(arg, high_col=high_col, low_col=low_col, close_col=close_col)
    yclose = arg[close_col].shift(1)
    low, high = arg[low_col], arg[high_col]
    mx = pd.DataFrame({'a': high, 'b': yclose}).max(axis=1, skipna=skipna)
    mn = pd.DataFrame({'a': low, 'b': yclose}).min(axis=1, skipna=skipna)
    result = mx - mn
    return pd.Series(result, index=arg.index, name='true_range')
584009
def setup_params(self, data):
        
        # Variable for which to do the stacking
        if 'ymax' in data:
            if any((data['ymin'] != 0) & (data['ymax'] != 0)):
                warn("Stacking not well defined when not "
                     "anchored on the axis.", PlotnineWarning)
            var = 'ymax'
        elif 'y' in data:
            var = 'y'
        else:
            warn("Stacking requires either ymin & ymax or y "
                 "aesthetics. Maybe you want position = 'identity'?",
                 PlotnineWarning)
            var = None

        params = self.params.copy()
        params['var'] = var
        params['fill'] = self.fill
        return params
1115775
def autoscale_y(ax,margin=0.1):
    """"""
    # Thanks to http://stackoverflow.com/questions/29461608/matplotlib-fixing-x-axis-scale-and-autoscale-y-axis for inspiring this!
    
    import numpy as np

    def get_bottom_top(line,lo,hi):
        xd = line.get_xdata()
        yd = line.get_ydata()
        y_displayed = yd[((xd>lo) & (xd<hi))]
        if len(y_displayed)==0:
            #No plotted data is inside the xlims
            return None, None
        else:
            h = np.max(y_displayed) - np.min(y_displayed)
            bot = np.min(y_displayed)-margin*h
            top = np.max(y_displayed)+margin*h
            return bot,top

    lines = ax.get_lines()
     
    lo,hi = ax.get_xlim()
    
    # Do a quick check to see if the x-axis has been inverted
    if lo>hi: # Reverse them for now
        lo,hi = hi,lo
        
    # Initialize limits
    bot,top = np.inf, -np.inf

    for line in lines:
        new_bot, new_top = get_bottom_top(line,lo,hi)
        if new_bot is not None:
            if new_bot < bot: bot = new_bot
            if new_top > top: top = new_top

    # Check to see if it is appropriate to change the boundaries
    if bot !=np.inf and top != -np.inf:    
        ax.set_ylim(bot,top)
    
    return ax
1061990
def set_scale_base_xy(self, scale_x_base, scale_y_base):
        
        self.t_.set(scale_x_base=scale_x_base, scale_y_base=scale_y_base)
882247
def Y_less(self):
        """"""
        self.parent.value('y_scale', self.parent.value('y_scale') / 2)
        self.parent.traces.display()
1181893
def set_ylimits_widgets(self, set_min=True, set_max=True):
        """"""
        ymin, ymax = self.tab_plot.ax.get_ylim()
        if set_min:
            self.w.y_lo.set_text('{0}'.format(ymin))
        if set_max:
            self.w.y_hi.set_text('{0}'.format(ymax))
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()
149142
def _set_axis_limits(self, axis, view, subplots, ranges):
        
        # Extents
        extents = self.get_extents(view, ranges)
        if not extents or self.overlaid:
            axis.autoscale_view(scalex=True, scaley=True)
            return

        valid_lim = lambda c: util.isnumeric(c) and not np.isnan(c)
        coords = [coord if np.isreal(coord) or isinstance(coord, np.datetime64) else np.NaN for coord in extents]
        coords = [date2num(util.dt64_to_dt(c)) if isinstance(c, np.datetime64) else c
                  for c in coords]
        if self.projection == '3d' or len(extents) == 6:
            l, b, zmin, r, t, zmax = coords
            if self.invert_zaxis or any(p.invert_zaxis for p in subplots):
                zmin, zmax = zmax, zmin
            if zmin != zmax:
                if valid_lim(zmin):
                    axis.set_zlim(bottom=zmin)
                if valid_lim(zmax):
                    axis.set_zlim(top=zmax)
        else:
            l, b, r, t = coords

        if self.invert_axes:
            l, b, r, t = b, l, t, r

        invertx = self.invert_xaxis or any(p.invert_xaxis for p in subplots)
        xlim, scalex = self._compute_limits(l, r, self.logx, invertx, 'left', 'right')
        inverty = self.invert_yaxis or any(p.invert_yaxis for p in subplots)
        ylim, scaley =  self._compute_limits(b, t, self.logy, inverty, 'bottom', 'top')
        if xlim:
            axis.set_xlim(**xlim)
        if ylim:
            axis.set_ylim(**ylim)
        axis.autoscale_view(scalex=scalex, scaley=scaley)
167462
def setTargetRange(self, targetRange, padding=None):
        
        # viewBox.setRange doesn't accept an axis number :-(
        if self.axisNumber == X_AXIS:
            xRange, yRange = targetRange, None
        else:
            xRange, yRange = None, targetRange

        # Do not set disableAutoRange to True in setRange; it triggers 'one last' auto range.
        # This is why the viewBox' autorange must be False at construction.
        self.viewBox.setRange(xRange = xRange, yRange=yRange, padding=padding,
                              update=False, disableAutoRange=False)
767361
def set(self, x, y):
        
        x = normalize(x)
        y = normalize(y)
        col, row = get_pos(x, y)

        if type(self.chars[row][col]) != int:
            return

        self.chars[row][col] |= pixel_map[y % 4][x % 2]
952099
private void updateUpperYValue() {
        double upper = 1.0;
        if (this.measures != null) {
            upper = max_y_value * (1 + (0.1 / y_resolution));
        }

        this.axesPanel.setUpperYValue(upper);
        this.plotPanel.setUpperYValue(upper);
    }
512557
public void setRange( double minValue , double maxValue ) {
		this.maxValue = maxValue;
		this.minValue = minValue;

		divisor = 1.00001*(maxValue-minValue)/numBins;

		histIndexes.resize(numBins);

		if( histObjs.length < numBins ) {
		histObjs = new FastQueue[ numBins ];
			for (int i = 0; i < numBins; i++) {
				histObjs[i] = new FastQueue<SortableParameter_F64>(SortableParameter_F64.class,true);
			}
		}
	}
454632
public void setY(float v) {
    if (DocumentElement_Type.featOkTst && ((DocumentElement_Type)jcasType).casFeat_y == null)
      jcasType.jcas.throwFeatMissing("y", "ch.epfl.bbp.uima.types.DocumentElement");
    jcasType.ll_cas.ll_setFloatValue(addr, ((DocumentElement_Type)jcasType).casFeatCode_y, v);}