returns plotter y coordinate
766988
def scaleY(self, y):
        ''
        return round(self.plotviewBox.ymin+(y-self.visibleBox.ymin)*self.yScaler)
36947
def inside(self, x, y):
        
        return 0 <= x < self.width and 0 <= y < self.height
1120384
def coordinates(self, x, y):
        ''''''
        state = self.state
        return state.mt.coord_from_area(x, y, state.lat, state.lon, state.width, state.ground_width)
1335500
def set_ylim_cb(self, redraw=True):
        """"""
        try:
            ymin = float(self.w.y_lo.get_text())
        except Exception:
            set_min = True
        else:
            set_min = False

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

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

        if not (set_min and set_max):
            self.tab_plot.ax.set_ylim(ymin, ymax)
            if redraw:
                self.tab_plot.draw()
909275
def y0(self):
        
        try:
            return self._y0
        except AttributeError:
            self._y0 = Quantity(0, self.yunit)
            return self._y0
784449
def transform(self, y):
        
        if self.transform_type == 'log':
            return np.log(y)
        elif self.transform_type == 'exp':
            return np.exp(y)
        elif self.transform_type == 'sqrt':
            return np.sqrt(y)
        elif self.transform_type == 'sin':
            return np.sin(y)
        elif self.transform_type == 'cos':
            return np.cos(y)
        elif self.transform_type == 'tan':
            return np.tan(y)
        elif self.transform_type == 'abs':
             return np.abs(y)
34934
def coordinates(self, x, y, **kwargs):
        ''''''
        kwargs['returntype'] = 'geographies'
        fields = {
            'x': x,
            'y': y
        }

        return self._fetch('coordinates', fields, **kwargs)
1026869
def with_plotter(self):
        """"""
        return self.__class__(
            (arr for arr in self if arr.psy.plotter is not None),
            auto_update=bool(self.auto_update))
374002
def plot_fixed_y(self, y_values, x_derivative=0, steps=1000, smooth=0, simple='auto', xmin="auto", xmax="auto", format=True, clear=1):
        
        if simple=='auto': simple=self.simple


        # get the min and max
        if xmin=="auto": xmin = self.xmin
        if xmax=="auto": xmax = self.xmax
        if clear: _pylab.gca().clear()

        if not type(y_values) in [type([]), type(_pylab.array([]))]: y_values = [y_values]

        for y in y_values:
            # define a new simple function to plot, then plot it
            def f(x): return self.evaluate(x, y, x_derivative, smooth, simple)
            _pylab_help.plot_function(f, xmin, xmax, steps, 0, True)

            # label it
            a = _pylab.gca()
            th = "th"
            if x_derivative == 1: th = "st"
            if x_derivative == 2: th = "nd"
            if x_derivative == 3: th = "rd"
            if x_derivative: a.set_ylabel(str(x_derivative)+th+" "+self.xlabel+" derivative of "+self.zlabel+" spline")
            else:            a.set_ylabel(self.zlabel)
            a.set_xlabel(self.xlabel)
            a.set_title(self._path+"\nSpline array plot at fixed y "+self.ylabel)
            a.get_lines()[-1].set_label("y ("+self.ylabel+") = "+str(y))
        if format: _s.format_figure()
        return a
656195
def prox_yline(y, step):
    """"""
    if not np.isscalar(y):
        y= y[0]
    if y > -0.75:
        return np.array([-0.75])
    else:
        return np.array([y])
622276
def get_center(self):
        
        return Point((self.p1.x+self.p2.x)/2.0, (self.p1.y+self.p2.y)/2.0)
208773
def getPixelValue(self, x, y):
        """"""
        assert x < self.size, "x: %d<%d" % (x, self.size)
        assert y < self.size, "y: %d<%d" % (y, self.size)
        # Same as calcOffset, inlined for performance reasons
        offset = x + self.size * (self.size - y - 1)
        #print offset
        value = self.data[offset]
        if value == -32768:
            return -1 # -32768 is a special value for areas with no data
        return value
957674
def on_plot_select(self,event):
        
        if not self.xdata or not self.ydata: return
        pos=event.GetPosition()
        width, height = self.canvas.get_width_height()
        pos[1] = height - pos[1]
        xpick_data,ypick_data = pos
        xdata_org = self.xdata
        ydata_org = self.ydata
        data_corrected = self.map.transData.transform(vstack([xdata_org,ydata_org]).T)
        xdata,ydata = data_corrected.T
        xdata = list(map(float,xdata))
        ydata = list(map(float,ydata))
        e = 4e0

        index = None
        for i,(x,y) in enumerate(zip(xdata,ydata)):
            if 0 < sqrt((x-xpick_data)**2. + (y-ypick_data)**2.) < e:
                index = i
                break
        if index==None: print("Couldn't find point %.1f,%.1f"%(xpick_data,ypick_data))

        self.change_selected(index)
553828
def _y_axis(self, draw_axes=True):
        """"""
        if not self._y_labels or not self.show_y_labels:
            return

        axis = self.svg.node(self.nodes['plot'], class_="axis y web")

        for label, r in reversed(self._y_labels):
            major = r in self._y_labels_major
            if not (self.show_minor_y_labels or major):
                continue
            guides = self.svg.node(
                axis,
                class_='%sguides' %
                ('logarithmic ' if self.logarithmic else '')
            )
            if self.show_y_guides:
                self.svg.line(
                    guides, [self.view((r, theta)) for theta in self._x_pos],
                    close=True,
                    class_='%sguide line' % ('major ' if major else '')
                )
            x, y = self.view((r, self._x_pos[0]))
            x -= 5
            text = self.svg.node(
                guides, 'text', x=x, y=y, class_='major' if major else ''
            )
            text.text = label

            if self.y_label_rotation:
                text.attrib[
                    'transform'
                ] = "rotate(%d %f %f)" % (self.y_label_rotation, x, y)

            self.svg.node(
                guides,
                'title',
            ).text = self._y_format(r)
1016211
def Y(self, value):
        
        if isinstance(value, (int, float,
                              long, types.NoneType)):
            self._y = value
1303454
def scaleY(self, canvasY):
        ''
        plotterY = super().scaleY(canvasY)
        return (self.plotviewBox.ymax-plotterY+4)
847755
def cnst_AT(self, Y):
        
        """

        return self.cnst_A0T(self.block_sep0(Y)) + \
            np.sum(self.cnst_A1T(self.block_sep1(Y)), axis=-1)