private void setZoomType(double magnitude, char zoomType)
    {
        //zoomType
        //+ = zoom in
        //- is zoom out
        //s is standard
        //t is trigonometric
        //# is statistic
        xmin=Double.parseDouble(Xmin.getText());
        xmax=Double.parseDouble(Xmax.getText());
        ymin=Double.parseDouble(Ymin.getText());
        ymax=Double.parseDouble(Ymax.getText());
        Ghost.delayInt=128;
        switch(zoomType)
        {
            case '+':
                xmin/=magnitude;
                xmax/=magnitude;
                ymin/=magnitude;
                ymax/=magnitude;
                break;
            case '-':
                xmin*=magnitude;
                xmax*=magnitude;
                ymin*=magnitude;
                ymax*=magnitude;
                break;
            case 's':
                xmin=-10;
                xmax=10;
                ymin=-10;
                ymax=10;
                break;
            case 't':
                xmin=Math.PI*-2;
                xmax=Math.PI*2;
                ymin=-2;
                ymax=2;
                break;
            case '#':
                xmin=0;
                xmax=10;
                ymin=0;
                ymax=10;
                break;
            default:
                JOptionPane.showMessageDialog(null,"Error occured while attempting to zoom");
        }
        
        //write to bounds text fields
        DecimalFormat DForm = new DecimalFormat("#.##");
        xmin=Double.valueOf(DForm.format(xmin));
        xmax=Double.valueOf(DForm.format(xmax));
        ymin=Double.valueOf(DForm.format(ymin));
        ymax=Double.valueOf(DForm.format(ymax));
        Xmin.setText(Double.toString(xmin));
        Xmax.setText(Double.toString(xmax));
        Ymin.setText(Double.toString(ymin));
        Ymax.setText(Double.toString(ymax));
        //graph with new window bounds
        plot();
    }