Set the X/Y scaling factors to be equal in each channel.
762670
def reset_scale_skew(self):
        
        chnames = self.fv.get_channel_names()
        for chname in chnames:
            chinfo = self.fv.get_channel(chname)

            scales = chinfo.fitsimage.get_scale_xy()
            fac = min(*scales)
            chinfo.fitsimage.scale_to(fac, fac)
940110
def apply_zoom_factor(self):
        """"""
        if hasattr(self, 'setZoomFactor'):
            # Assuming Qt >=v4.5
            self.setZoomFactor(self.zoom_factor)
        else:
            # Qt v4.4
            self.setTextSizeMultiplier(self.zoom_factor)
297442
def zoom(ax, xy='x', factor=1):
    
    limits = ax.get_xlim() if xy == 'x' else ax.get_ylim()
    new_limits = (0.5*(limits[0] + limits[1])
                  + 1./factor * np.array((-0.5, 0.5)) * (limits[1] - limits[0]))
    if xy == 'x':
        ax.set_xlim(new_limits)
    else:
        ax.set_ylim(new_limits)
471113
def scale(self, x, y=None, z=None):
        ""
        if y is None:
            y = x
        if z is None:
            z = x
        m = self
        for col in range(4):
            # Only the top three rows
            m[0,col] *= x
            m[1,col] *= y
            m[2,col] *= z
        return self
655445
def set_scale(self):
        """"""

        f_min = float(self.lower_freq)
        f_max = float(self.higher_freq)
        y_min = f_min
        y_max = f_max
        for y in range(self.image_height):
            freq = y_min + y / (self.image_height - 1.0) * (y_max - y_min)
            fft_bin = freq / f_max * (self.fft_size / 2 + 1)
            if fft_bin < self.fft_size / 2:
                alpha = fft_bin - int(fft_bin)
                self.y_to_bin.append((int(fft_bin), alpha * 255))
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()
1205767
public void setCamera( double skew , double cx , double cy , int width , int height ) {

		// Define normalization matrix
		// center points, remove skew, scale coordinates
		double d = Math.sqrt(width*width + height*height);
		V.zero();
		V.set(0,0,d/2); V.set(0,1,skew); V.set(0,2,cx);
		V.set(1,1,d/2); V.set(1,2,cy);
		V.set(2,2,1);

		CommonOps_DDRM.invert(V,Vinv);
	}
1044832
def set_default(self, channels=None):
        '''
        '''
        if not channels:
            channels = self._ch_cal.keys()
        for channel in channels:
            self.set_voltage(channel, self._ch_cal[channel]['default'], unit='V')
104226
def set(self, x, y, value):
        
        xBase = int(x) * self.xScale
        yBase = int(y) * self.yScale
        for xOffset in range(self.xScale):
            for yOffset in range(self.yScale):
                self.data[yBase + yOffset, xBase + xOffset] = value
660209
public void scaleAbsolute(float newWidth, float newHeight) {
		plainWidth = newWidth;
		plainHeight = newHeight;
		float[] matrix = matrix();
		scaledWidth = matrix[DX] - matrix[CX];
		scaledHeight = matrix[DY] - matrix[CY];
		setWidthPercentage(0);
	}
280862
def ScaleLarger(self):
    """"""
    newfactor = self._zoomfactor + 0.1
    if float(newfactor) > 0 and float(newfactor) < self._MAX_ZOOM:
      self._zoomfactor = newfactor
1374545
def _set_scale(self, value):
        
        sx, sxy, syx, sy, ox, oy = self.transformation
        sx, sy = value
        self.transformation = (sx, sxy, syx, sy, ox, oy)
1307094
private void set(Point3d[] x, Point3d[] y) {
		this.x = x;
		this.y = y;
		rmsdCalculated = false;
		transformationCalculated = false;
	}
1090314
def setgraphval(delta, graph, key, val):
    """"""
    delta.setdefault(graph, {})[key] = val
321938
def scale_to_vol(self, vol):
        """"""

        f = np.exp((np.log(vol) - np.log(self.vol)) / self.n)  # linear factor
        self.expand *= f
        self.cov *= f**2
        self.am *= f**-2
        self.axlens *= f
        self.axes *= f
        self.vol = vol
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()
671721
def apply_scaling(self, copy=True):
        
        if copy:
            return self.multiplier * self.data + self.base

        if self.multiplier != 1:
            self.data *= self.multiplier

        if self.base != 0:
            self.data += self.base

        return self.data