亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? logarithmicaxis.java

?? Web圖形化的Java庫
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
            if (lower > 10.0) {   //parameter value is > 10
                // The Math.log() function is based on e not 10.
                logFloor = Math.log(lower) / LOG10_VALUE;
                logFloor = Math.floor(logFloor);
                logFloor = Math.pow(10, logFloor);
            }
            else if (lower < -10.0) {   //parameter value is < -10
                //calculate log using positive value:
                logFloor = Math.log(-lower) / LOG10_VALUE;
                //calculate floor using negative value:
                logFloor = Math.floor(-logFloor);
                //calculate power using positive value; then negate
                logFloor = -Math.pow(10, -logFloor);
            }
            else {
                //parameter value is -10 > val < 10
                logFloor = Math.floor(lower);   //use as-is
            }
        }
        else {
            //negative values not allowed
            if (lower > 0.0) {   //parameter value is > 0
                // The Math.log() function is based on e not 10.
                logFloor = Math.log(lower) / LOG10_VALUE;
                logFloor = Math.floor(logFloor);
                logFloor = Math.pow(10, logFloor);
            }
            else {
                //parameter value is <= 0
                logFloor = Math.floor(lower);   //use as-is
            }
        }
        return logFloor;
    }

    /**
     * Returns the smallest (closest to negative infinity) double value that is
     * not less than the argument, is equal to a mathematical integer and
     * satisfying the condition that log base 10 of the value is an integer
     * (i.e., the value returned will be a power of 10: 1, 10, 100, 1000, etc.).
     *
     * @param upper a double value above which a ceiling will be calcualted.
     *
     * @return 10<sup>N</sup> with N .. { 1 ... }
     */
    protected double computeLogCeil(double upper) {

        double logCeil;
        if (allowNegativesFlag) {
            //negative values are allowed
            if (upper > 10.0) {
                //parameter value is > 10
                // The Math.log() function is based on e not 10.
                logCeil = Math.log(upper) / LOG10_VALUE;
                logCeil = Math.ceil(logCeil);
                logCeil = Math.pow(10, logCeil);
            }
            else if (upper < -10.0) {
                //parameter value is < -10
                //calculate log using positive value:
                logCeil = Math.log(-upper) / LOG10_VALUE;
                //calculate ceil using negative value:
                logCeil = Math.ceil(-logCeil);
                //calculate power using positive value; then negate
                logCeil = -Math.pow(10, -logCeil);
            }
            else {
               //parameter value is -10 > val < 10
               logCeil = Math.ceil(upper);     //use as-is
            }
        }
        else {
            //negative values not allowed
            if (upper > 0.0) {
                //parameter value is > 0
                // The Math.log() function is based on e not 10.
                logCeil = Math.log(upper) / LOG10_VALUE;
                logCeil = Math.ceil(logCeil);
                logCeil = Math.pow(10, logCeil);
            }
            else {
                //parameter value is <= 0
                logCeil = Math.ceil(upper);     //use as-is
            }
        }
        return logCeil;
    }

    /**
     * Rescales the axis to ensure that all data is visible.
     */
    public void autoAdjustRange() {

        Plot plot = getPlot();
        if (plot == null) {
            return;  // no plot, no data.
        }

        if (plot instanceof ValueAxisPlot) {
            ValueAxisPlot vap = (ValueAxisPlot) plot;

            double lower;
            Range r = vap.getDataRange(this);
            if (r == null) {
                   //no real data present
                r = new Range(DEFAULT_LOWER_BOUND, DEFAULT_UPPER_BOUND);
                lower = r.getLowerBound();    //get lower bound value
            }
            else {
                   //actual data is present
              lower = r.getLowerBound();    //get lower bound value
              if (strictValuesFlag && !allowNegativesFlag && lower <= 0.0)
              { //strict flag set, allow-negatives not set and values <= 0
                throw new RuntimeException("Values less than or equal to " 
                                           + "zero not allowed with logarithmic axis");
              }
            }

                   //change to log version of lowest value to make range
                   // begin at a 10^n value:
            lower = computeLogFloor(lower);

            if (!allowNegativesFlag && lower >= 0.0 && lower < SMALL_LOG_VALUE) {
                //negatives not allowed and lower range bound is zero
                lower = r.getLowerBound();    //use data range bound instead
            }

            double upper = r.getUpperBound();
            if (!allowNegativesFlag && upper < 1.0 && upper > 0.0 && lower > 0.0) {
                //negatives not allowed and upper bound between 0 & 1
                //round up to nearest significant digit for bound:
                //get negative exponent:
                double expVal = Math.log(upper) / LOG10_VALUE;
                expVal = Math.ceil(-expVal + 0.001); //get positive exponent
                expVal = Math.pow(10, expVal);      //create multiplier value
                //multiply, round up, and divide for bound value:
                upper = (expVal > 0.0) ? Math.ceil(upper * expVal) / expVal : Math.ceil(upper);
            }
            else {
                //negatives allowed or upper bound not between 0 & 1
                upper = computeLogCeil(upper);  //use nearest log value
            }
            // ensure the autorange is at least <minRange> in size...
            double minRange = getAutoRangeMinimumSize();
            if (upper - lower < minRange) {
              upper = (upper + lower + minRange) / 2;
              lower = (upper + lower - minRange) / 2;
                   //if autorange still below minimum then adjust by 1%
                   // (can be needed when minRange is very small):
              if (upper - lower < minRange) {
                final double absUpper = Math.abs(upper);
                        //need to account for case where upper==0.0
                final double adjVal = (absUpper > SMALL_LOG_VALUE) ? absUpper / 100.0 : 0.01;
                upper = (upper + lower + adjVal) / 2;
                lower = (upper + lower - adjVal) / 2;
              }
            }

            setRange(new Range(lower, upper), false, false);

            setupSmallLogFlag();       //setup flag based on bounds values
        }
    }

    /**
     * Converts a data value to a coordinate in Java2D space, assuming that
     * the axis runs along one edge of the specified plotArea.
     * Note that it is possible for the coordinate to fall outside the
     * plotArea.
     *
     * @param value  the data value.
     * @param plotArea  the area for plotting the data.
     * @param edge  the axis location.
     *
     * @return the Java2D coordinate.
     */
    public double translateValueToJava2D(double value, Rectangle2D plotArea,
                                         RectangleEdge edge) {

        Range range = getRange();
        double axisMin = switchedLog10(range.getLowerBound());
        double axisMax = switchedLog10(range.getUpperBound());

        double min = 0.0;
        double max = 0.0;
        if (RectangleEdge.isTopOrBottom(edge)) {
            min = plotArea.getMinX();
            max = plotArea.getMaxX();
        }
        else if (RectangleEdge.isLeftOrRight(edge)) {
            min = plotArea.getMaxY();
            max = plotArea.getMinY();
        }

        value = switchedLog10(value);

        if (isInverted()) {
            return max - (((value - axisMin) / (axisMax - axisMin)) * (max - min));
        }
        else {
            return min + (((value - axisMin) / (axisMax - axisMin)) * (max - min));
        }

    }

    /**
     * Converts a coordinate in Java2D space to the corresponding data
     * value, assuming that the axis runs along one edge of the specified plotArea.
     *
     * @param java2DValue  the coordinate in Java2D space.
     * @param plotArea  the area in which the data is plotted.
     * @param edge  the axis location.
     *
     * @return the data value.
     */
    public double translateJava2DtoValue(float java2DValue, Rectangle2D plotArea,
                                         RectangleEdge edge) {

        Range range = getRange();
        double axisMin = switchedLog10(range.getLowerBound());
        double axisMax = switchedLog10(range.getUpperBound());

        double plotMin = 0.0;
        double plotMax = 0.0;
        if (RectangleEdge.isTopOrBottom(edge)) {
            plotMin = plotArea.getX();
            plotMax = plotArea.getMaxX();
        }
        else if (RectangleEdge.isLeftOrRight(edge)) {
            plotMin = plotArea.getMaxY();
            plotMax = plotArea.getMinY();
        }

        if (isInverted()) {
          return Math.pow(10, axisMax
                 - ((java2DValue - plotMin) / (plotMax - plotMin)) * (axisMax - axisMin));
        }
        else {
          return Math.pow(10, axisMin
                 + ((java2DValue - plotMin) / (plotMax - plotMin)) * (axisMax - axisMin));
        }
    }

    /**
     * Calculates the positions of the tick labels for the axis, storing the results in the
     * tick label list (ready for drawing).
     *
     * @param g2  the graphics device.
     * @param cursor  the cursor.
     * @param drawArea  the area in which the plot and the axes should be drawn.
     * @param dataArea  the area in which the plot should be drawn.
     * @param edge  the location of the axis.
     */
    public void refreshTicks(Graphics2D g2, double cursor,
                             Rectangle2D drawArea, Rectangle2D dataArea,
                             RectangleEdge edge) {

        if (RectangleEdge.isTopOrBottom(edge)) {
            refreshTicksHorizontal(g2, drawArea, dataArea, edge);
        }
        else if (RectangleEdge.isLeftOrRight(edge)) {
            refreshTicksVertical(g2, drawArea, dataArea, edge);
        }

    }

    /**
     * Calculates the positions of the tick labels for the axis, storing the results in the
     * tick label list (ready for drawing).
     *
     * @param g2  the graphics device.
     * @param drawArea  the area in which the plot and the axes should be drawn.
     * @param dataArea  the area in which the plot should be drawn.
     * @param edge  the location of the axis.
     */
    public void refreshTicksHorizontal(Graphics2D g2, Rectangle2D drawArea, Rectangle2D dataArea,
                                       RectangleEdge edge) {
        getTicks().clear();

        Range range = getRange();

        //get lower bound value:
        double lowerBoundVal = range.getLowerBound();
              //if small log values and lower bound value too small
              // then set to a small value (don't allow <= 0):
        if (smallLogFlag && lowerBoundVal < SMALL_LOG_VALUE) {
            lowerBoundVal = SMALL_LOG_VALUE;
        }

        //get upper bound value
        final double upperBoundVal = range.getUpperBound();

        //get log10 version of lower bound and round to integer:
        int iBegCount = (int) Math.rint(switchedLog10(lowerBoundVal));
        //get log10 version of upper bound and round to integer:
        final int iEndCount = (int) Math.rint(switchedLog10(upperBoundVal));

        if (iBegCount == iEndCount && iBegCount > 0 && Math.pow(10, iBegCount) > lowerBoundVal) {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日本在线视频| 亚洲精品成人少妇| 亚洲精品在线电影| 日韩欧美国产一二三区| 91精品国产全国免费观看| 欧美精品在欧美一区二区少妇| 欧美色中文字幕| 欧美日韩国产精品自在自线| 日本精品一区二区三区四区的功能| 色婷婷av一区二区三区软件| 色悠久久久久综合欧美99| 色综合久久天天综合网| 在线观看亚洲专区| 欧美探花视频资源| 欧美另类高清zo欧美| 69成人精品免费视频| 日韩精品在线网站| www久久精品| 国产精品网曝门| 最新国产の精品合集bt伙计| 亚洲女同女同女同女同女同69| 亚洲精品菠萝久久久久久久| 亚洲午夜精品17c| 青青草国产精品亚洲专区无| 国产在线视频不卡二| 成人免费视频app| 色噜噜偷拍精品综合在线| 欧美精品tushy高清| 欧美sm极限捆绑bd| 国产精品色呦呦| 亚洲宅男天堂在线观看无病毒| 日韩成人一级大片| 国内国产精品久久| 99久久伊人久久99| 在线观看区一区二| 精品久久国产97色综合| 国产精品少妇自拍| 亚洲成人av一区二区三区| 久久精品久久久精品美女| 成人丝袜18视频在线观看| 欧美午夜片在线看| 久久久99免费| 亚洲第一成人在线| 韩日精品视频一区| 色婷婷香蕉在线一区二区| 日韩欧美一区二区在线视频| 国产精品免费视频观看| 日韩精品乱码免费| 国产91高潮流白浆在线麻豆 | 国产精品综合久久| 91激情五月电影| 久久久蜜桃精品| 亚洲一区二区三区视频在线播放| 韩国成人精品a∨在线观看| 色婷婷综合在线| 精品不卡在线视频| 亚洲一区二区欧美日韩| 国产麻豆成人精品| 欧美日本在线播放| 国产精品无遮挡| 日本不卡123| 在线欧美一区二区| 久久影院午夜论| 午夜欧美视频在线观看| 成人免费观看男女羞羞视频| 日韩一区二区电影网| 一区二区三区资源| 国产999精品久久久久久| 7878成人国产在线观看| 亚洲男人天堂av网| 国产精品1024| 欧美一区二区播放| 亚洲精品综合在线| 成人免费看的视频| 久久久美女艺术照精彩视频福利播放| 亚洲二区在线观看| 成人爽a毛片一区二区免费| 精品久久国产97色综合| 亚洲午夜私人影院| 99久久er热在这里只有精品66| 久久久噜噜噜久噜久久综合| 男人操女人的视频在线观看欧美| 在线观看中文字幕不卡| **欧美大码日韩| 成人性生交大片免费看中文| 2024国产精品| 久久国产生活片100| 555www色欧美视频| 亚洲福利一区二区| 欧美亚洲国产一卡| 亚洲激情一二三区| 色悠悠久久综合| 亚洲日本va午夜在线影院| 国产高清久久久久| 国产亚洲精品bt天堂精选| 精品亚洲porn| 欧美mv日韩mv| 久久se精品一区精品二区| 欧美一级免费大片| 日韩精品久久理论片| 欧美精选在线播放| 日韩精品欧美精品| 日韩一级视频免费观看在线| 蜜臀精品一区二区三区在线观看 | 久久九九久精品国产免费直播| 激情欧美一区二区| 国产亚洲精久久久久久| 国产激情一区二区三区桃花岛亚洲 | 欧美一区二区三区免费观看视频| 午夜亚洲福利老司机| 91精品国产综合久久久久久久久久 | 日韩三级中文字幕| 国产精品美女久久久久aⅴ| 成人综合日日夜夜| 国产精品妹子av| 91麻豆精品秘密| 亚洲国产综合91精品麻豆| 欧美精品乱码久久久久久按摩| 天天综合色天天| 欧美一区二区在线看| 久久不见久久见中文字幕免费| 久久久久久久综合日本| 成人av网在线| 亚洲主播在线播放| 日韩一区二区三区在线观看| 国产在线视频一区二区三区| 国产人久久人人人人爽| 91网上在线视频| 亚洲成人av一区二区三区| 欧美v国产在线一区二区三区| 国产成人综合视频| 夜夜嗨av一区二区三区中文字幕| 欧美日本一道本在线视频| 久久精工是国产品牌吗| 国产精品美日韩| 欧美日韩亚洲不卡| 韩国视频一区二区| 亚洲天堂网中文字| 日韩一区二区三区三四区视频在线观看| 国产综合色视频| 亚洲精品乱码久久久久久黑人| 在线电影院国产精品| 国产成人综合在线观看| 亚洲高清在线视频| www欧美成人18+| 在线一区二区三区四区五区| 久久精品国产在热久久| 亚洲特黄一级片| 日韩精品专区在线影院观看| 91在线小视频| 精品一区二区三区免费毛片爱| 亚洲色图另类专区| 日韩欧美国产高清| 色综合天天综合在线视频| 另类专区欧美蜜桃臀第一页| 亚洲私人黄色宅男| 精品乱码亚洲一区二区不卡| 91成人看片片| 国产成人午夜视频| 日韩综合小视频| 亚洲日本在线a| 久久综合久色欧美综合狠狠| 欧美三级日本三级少妇99| 国产成人午夜高潮毛片| 日韩av在线发布| 一区二区成人在线| 久久久亚洲综合| 7777精品伊人久久久大香线蕉的 | 在线成人免费视频| 99视频在线观看一区三区| 蜜桃视频在线观看一区二区| 亚洲日本乱码在线观看| 久久久亚洲高清| 欧美一区二区三区爱爱| 色天天综合色天天久久| 国产东北露脸精品视频| 美女任你摸久久| 亚洲午夜羞羞片| 中文字幕日韩av资源站| 久久亚洲一区二区三区明星换脸| 欧美日本在线视频| 在线精品视频一区二区三四| www.综合网.com| 国产不卡视频一区| 久久爱www久久做| 奇米亚洲午夜久久精品| 亚洲成av人片在www色猫咪| 亚洲天天做日日做天天谢日日欢| 国产视频911| 2017欧美狠狠色| 欧美精品一区视频| 日韩欧美精品在线| 欧美一区二区三区在线观看| 欧美日本一区二区| 欧美日韩精品一区二区三区蜜桃 | 欧美精品色一区二区三区| 欧美在线影院一区二区| 91久久免费观看| 91亚洲大成网污www| 99re热视频这里只精品|